Bug 187938
Summary: | Height of element changes when ellipses show on a -webkit-line-clamp element with line-height | ||
---|---|---|---|
Product: | WebKit | Reporter: | thewingthing |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Trivial | CC: | ahmad.saleem792, bfulgham, mmaxfield, simon.fraser, timarmstrong, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 233770 |
thewingthing
When there is an element with -webkit-line-clamp and line-height set, the height of the element is different when the text is just short enough to not warrant ellipses vs when the text is just long enough to warrant ellipses.
e.g.
With line-height
No ellipses: height is 44px
With ellipses: height is 42px
Without line-height
No ellipses: height is 38px
With ellipses: height is 38px
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Sam Sneddon [:gsnedders]
*** Bug 197525 has been marked as a duplicate of this bug. ***
Sam Sneddon [:gsnedders]
From the dupe:
(In reply to Timothy Armstrong from comment #0)
> * What steps will reproduce the problem?
>
> (1) Visit https://jsfiddle.net/4bzh2rv9/
> (2) Click the toggle button so that the box can no longer contain two lines
> of text (and shows an ellipsis).
> (3) Note that as soon as the above condition is met, the height of the box
> decreases, instead of allowing for the appropriate amount of line-height.
>
> * What is the expected result?
>
> The div height should not change once the ellipsis is present.
>
> * What happens instead?
>
> The div height shrinks once the ellipsis is present.
>
>
> (See also: crbug.com/937931)
Brent Fulgham
This appears to be tracked by this radar:
<rdar://50448006>
Ahmad Saleem
I am not able to reproduce the shrinkage of textarea in height using Safari Technology Preview 163 using testcase from Comment 02.
It is reproducible in Safari 16.3 though, can we mark this as "RESOLVED CONFIGURATION CHANGED"? Thanks!
zalan
This is an IFC progression (with line-clamp support enabled now).