Now that we’ve got cross-browser support for the line-clamp
property, I expect we’ll see a lot more of that around the web. And as we start to see it more in use, it’s worth the reminder that: Truncation is not a content strategy.
We should at least offer a way to read that that truncated content, right? Paul Bakaus uses the checkbox hack and some other trickery to add a functional button that does exactly that.
See the Pen
truncated text w/ more button (CSS only, with optional JS helper) by Paul Bakaus (@pbakaus)
on CodePen.
nothing that requires gecko 57+ is supported widely enough and shouldn’t be used unless it’s not critical feature
Indeed. If a browser does not support line-clamp and you have js; use alternate strategies or limit to single line.
Looks like it’s supported widely enough: https://caniuse.com/#search=line-clamp
I really don’t understand how in late 2019 the logic can be “nothing that requires gecko 57+ is supported widely enough and shouldn’t be used unless it’s not critical feature” especially when on a website about using CSS to it’s limit. Gecko 57 is 2 years old. Stating that “nothing beyond gecko 57 is supported widely enough” contradicts everyday web reality. How is anything supposed to make it into a standard if nobody uses it anyway?
We use things that are less widely supported all the time.
very cool