Re:Defensive CSS
by danielheath on Wednesday July 06, 2022 @07:15PM
(#32008071)
If the user has large text because they can’t read easily, how is clipping it short going to help them read it?
Usually when the layout breaks, functionality is lost: buttons can't be clicked on, text can't be read, content is obscured to the right, etc. If none of these things are happening, I'd agree not clipping is fine.
Do you have any data to back up that "usually"? IME more often than not the only reason why content is clipped is because of looks not because of functionality. This also applies to the example in the article.
The HTML default is to flow elements to make space for larger conent. You need to go out of your way to break that.
Without knowing the rendered width of the text string, you can't limit the text ahead of time. Or are you saying that all designs that can't accommodate text-wrapping should be avoided?