You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The line-clamp property is defined as a shorthand for three longhands, one of which is max-lines, which says that the clamp point should be after a particular line. You can also remove the max-lines property (or set the shorthand to line-clamp: auto) and set max-height to clamp by a height.
With the continue: discard approach that is currently in the spec, the clamping is based on fragmentation, and max-lines adds a region break. So if you have both max-lines and max-height and the content overflows before the specified line, it will clamp based on the height.
However, as we just resolved, line-clamp will instead default to the continue: collapse approach (see #7708) which isn't based on fragmentation. So should that have the same behavior when clamping by both a number of lines and a height?
In our implementation in Chromium, when we started working on it we decided to not support clamping by both, to focus the implementation effort to the simple cases. But maybe at this point it makes sense to reconsider this.
The text was updated successfully, but these errors were encountered:
The
line-clamp
property is defined as a shorthand for three longhands, one of which ismax-lines
, which says that the clamp point should be after a particular line. You can also remove themax-lines
property (or set the shorthand toline-clamp: auto
) and setmax-height
to clamp by a height.With the
continue: discard
approach that is currently in the spec, the clamping is based on fragmentation, andmax-lines
adds a region break. So if you have bothmax-lines
andmax-height
and the content overflows before the specified line, it will clamp based on the height.However, as we just resolved,
line-clamp
will instead default to thecontinue: collapse
approach (see #7708) which isn't based on fragmentation. So should that have the same behavior when clamping by both a number of lines and a height?In our implementation in Chromium, when we started working on it we decided to not support clamping by both, to focus the implementation effort to the simple cases. But maybe at this point it makes sense to reconsider this.
The text was updated successfully, but these errors were encountered: