Currently the syntax for the line-clamp property is none | [<integer [1,∞]> || <'block-ellipsis'>] -webkit-legacy?. The none branch at the left of the bar (|) sets all three longhands to their initial values. However, none is also a valid value for the right hand of the bar, since it's a valid value for the block-ellipsis property; and that would set continue to its non-initial collapse value.
The none left branch probably needs to keep that name for compatibility with -webkit-line-clamp1. But we probably want to be able to represent continue: collapse; max-lines: none; block-ellipsis: none with some shorthand. So should we find some other keyword for the block-ellipsis value where there's no ellipsis? Note that the declarations line-clamp: none 3 or line-clamp: none -webkit-legacy might be confusing to developers, especially since setting the block-ellipsis value might be uncommon.
cc @frivoal @emilio @bfgeek
Currently the syntax for the
line-clampproperty isnone | [<integer [1,∞]> || <'block-ellipsis'>] -webkit-legacy?. Thenonebranch at the left of the bar (|) sets all three longhands to their initial values. However,noneis also a valid value for the right hand of the bar, since it's a valid value for theblock-ellipsisproperty; and that would setcontinueto its non-initialcollapsevalue.The
noneleft branch probably needs to keep that name for compatibility with-webkit-line-clamp1. But we probably want to be able to representcontinue: collapse; max-lines: none; block-ellipsis: nonewith some shorthand. So should we find some other keyword for theblock-ellipsisvalue where there's no ellipsis? Note that the declarationsline-clamp: none 3orline-clamp: none -webkit-legacymight be confusing to developers, especially since setting theblock-ellipsisvalue might be uncommon.cc @frivoal @emilio @bfgeek
Footnotes
Well, traditionally, at least Webkit and Chromium's implementation of
-webkit-line-clampdidn't support thenonekeyword as an input, and also didn't support any other way to input the initial state of that property other than withinitial; although they did outputnonewhen serializing the property 🤷. But this has been fixed over the past few years, and currently all mainstream browsers will accept-webkit-line-clamp: none. ↩