CSS Overflow Level 4 defines line-clamp based on fragmentation (https://drafts.csswg.org/css-overflow-4/#line-clamp), but that is not feasible for Gecko or WebKit to implement anytime soon. Due to that, @emilio opened https://github.com/w3c/csswg-drafts/issues/7708 to discuss a variant of line-clamp that is based on hiding lines and boxes from paint instead ("the collapse variant"). There is no spec text written for this variant yet, but the CSSWG decided to greenlight both variants for prototyping, and in Chromium we are currently planning to prototype it, rather than the fragmentation-based variant.
WebKittens
@fantasai @heycam
Title of the spec
line-clamp
CSS property (collapse variant)URL to the spec
w3c/csswg-drafts#7708 (discussion issue; no spec yet)
URL to the spec's repository
No response
Issue Tracker URL
No response
Explainer URL
https://github.com/Igalia/explainers/blob/main/css/line-clamp/README.md
TAG Design Review URL
No response
Mozilla standards-positions issue URL
mozilla/standards-positions#984
WebKit Bugzilla URL
No response
Radar URL
No response
Description
CSS Overflow Level 4 defines
line-clamp
based on fragmentation (https://drafts.csswg.org/css-overflow-4/#line-clamp), but that is not feasible for Gecko or WebKit to implement anytime soon. Due to that, @emilio opened https://github.com/w3c/csswg-drafts/issues/7708 to discuss a variant ofline-clamp
that is based on hiding lines and boxes from paint instead ("the collapse variant"). There is no spec text written for this variant yet, but the CSSWG decided to greenlight both variants for prototyping, and in Chromium we are currently planning to prototype it, rather than the fragmentation-based variant.