Scale transformed text causing underline text decoration to be nonvisible
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
People
(Reporter: nguyen, Unassigned)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Steps to reproduce:
- Go to any website (https://en.wikipedia.org/ for example) on Firefox
- Apply a
text-decoration: underlinecss style to a paragraph - Apply a
transform: scale(0.4)css style or some other scale value smaller than 1 until the underline style to be nonvisible
Browser user agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0"
Actual results:
Some scaling value causing the underline style to disappear until apply another bigger scaling value
Expected results:
The underline decoration of the text should always be visible
Updated•3 years ago
|
Comment 1•3 years ago
|
||
To add to comment 0, the main problem here is not that when we reach certain scale level, the underline disappears onwards, but that the underline thickness is flickering, and at certain scale level, it totally disappears, but in a scale that is slightly smaller than it, it appears again.
Please see the testcase, if you drag the slider slowly to the left (or just keep pressing left arrow key), you can see the underline blinks, and at some specific levels, it sometimes disappears.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
It looks like we're independently snapping the top and bottom edges of the underline to device pixels, which probably isn't the best approach.
Trying other browsers, it looks like Safari snaps only the top of the underline, and then simply scales its width (so the bottom edge may not be sharp), and Chrome doesn't snap its position at all (so it becomes quite blurry under small scaling, but at least the behavior is smoother).
No solution seems ideal here, but something more like Safari's approach would be better than what we currently do, IMO.
Comment 3•3 years ago
|
||
Some of the snapping issue also happens with borders and so on, right? We snap to ensure at least one device pixel, but we can't account for transforms. That's bug 1258112
Description
•