Summary: | (regression) -webkit-line-clamp showing one line less line with inline-block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tanel Terras <tanel.terras> | ||||||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||
Status: | RESOLVED DUPLICATE | ||||||||||
Severity: | Normal | CC: | bfulgham, fantasai.bugs, karlcow, simon.fraser, vitor.roriz, webkit-bug-importer, zalan | ||||||||
Priority: | P2 | Keywords: | BrowserCompat, InRadar | ||||||||
Version: | Safari 17 | ||||||||||
Hardware: | Mac (Apple Silicon) | ||||||||||
OS: | macOS 14 | ||||||||||
Bug Depends on: | 261030 | ||||||||||
Bug Blocks: | |||||||||||
Attachments: |
|
Description
Tanel Terras
2024-05-17 05:15:28 PDT
Interesting observation from our Design System is also that when -webkit-line-clamp is toggled, Safari 17 clamps correctly after reassignment of -webkit-line-clamp. We are toggling on button click, then reassign -webkit-line-clamp with same initial value through JS. Created attachment 471469 [details]
rendering in safari, firefox, chrome
Thanks a lot Tanel for the report
1st paragraph shows
1 line in Safari
2 lines in Firefox/Chrome
2nd paragraph shows
2 lines in Safari
3 lines in Firefox/Chrome
Probably needs a simpler testcase. :)
Created attachment 471471 [details]
minimal tescase
Load this testcase in all 3 browsers.
Created attachment 471472 [details]
rendering in safari, firefox, chrome (minimal test case)
We can the difference in Safari when it includes an inline-block content.
It's indeed a kind of regression. Old build shows 2 lines but with the inline block being visible. This is a regression of https://github.com/WebKit/WebKit/commit/bf48ac60d4bb84f88ceb026495d8d9722be2ab5f Bug 261030 rdar://problem/114878221 So the fix from Alan, remove the inline block inside the line-clamp, but also in the same time reduced the line-clamp by one line. :) Thanks for looking into this! Sorry for the overly complicated testcase. I was in process of ruling out that <slot> and its `display: contents` affect this somehow. Any updates on this regression? This works on trunk, processed at https://commits.webkit.org/282348@main (going to forward dupe it). *** This bug has been marked as a duplicate of bug 277949 *** |