Implement line-clamp property
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Tracking
()
People
(Reporter: sebo, Unassigned)
References
(Depends on 7 open bugs, Blocks 6 open bugs, )
Details
Attachments
(1 file)
263.34 KB,
image/png
|
Details |
The CSS Overflow Module defines a line-clamp
shorthand property that allows to limit the contents of a block container to the specified number of lines.
According to the spec. this includes the implementation of -webkit-line-clamp
, which is covered by bug 866102.
Sebastian
Reporter | ||
Updated•6 years ago
|
The current support is a little ironic:
Blink : line-clamp
Webkit : line-clamp
Firefox: -webkit-line-clamp
Reporter | ||
Comment 2•4 years ago
•
|
||
This issue is meant to implement the standardized version of line-clamp
. Neither Blink nor WebKit currently support the unprefixed version, see https://caniuse.com/css-line-clamp. They only support the -webkit
prefixed version, which also got implemented in Gecko in the meantime.
Here are the related feature requests:
https://crbug.com/305376
https://bugs.webkit.org/show_bug.cgi?id=206748
Sebastian
Really sorry, I should have better checked.
https://github.com/LeaVerou/css3test/commit/7e46e7d6a0655dc2dbe6b0d0dad681ca0e770978
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Hm. Looks like Google's search result showing "Top stories" expect this property to work - see attached screenshot.
Reporter | ||
Comment 5•2 years ago
|
||
Interesting, because nothing has changed since my last comment. No browser supports the unprefixed version yet.
line-clamp
was also moved to CSS Overflow 4 in the meantime, so I'm adusting the references.
I am also wondering, what are the issues preventing the implementation? I mean, -webkit-line-clamp
is already implemented. The standardized version basically does the same. The main differences are that it avoids all the quirks the prefixed version has and allows to change the ellipsis similar to text-overflow
. So, I assume, a lot of code could be reused for that.
Is it just a question of resources and priorization or is there something missing in the spec.?
Emilio, maybe you can answer those questions.
Sebastian
Comment 6•2 years ago
|
||
The standardized version does something very different, see https://github.com/w3c/csswg-drafts/issues/7708 for example.
Updated•3 months ago
|
Description
•