Description
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-clamp
1. 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.
Footnotes
-
Well, traditionally, at least Webkit and Chromium's implementation of
-webkit-line-clamp
didn't support thenone
keyword 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 outputnone
when serializing the property 🤷. But this has been fixed over the past few years, and currently all mainstream browsers will accept-webkit-line-clamp: none
. ↩