Overriding line-height doesn't reset the value properly.
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox153 | --- | fixed |
People
(Reporter: robin, Assigned: salipov)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Steps to reproduce:
The following codepen shows that when you set a global line-height in a * selector, and then override it for a specific selector, it still uses the old value.
If you compare the codepen between Chrome and Firefox, you'll notice that in Chrome the lines are really close together (at a line-height of 1), but in Firefox they're really far apart (the old value 5).
https://codepen.io/Robin-Mosterd/pen/eYqMzwK
Actual results:
The line-height was at the wrong, old value.
Expected results:
The line-height should've been overwritten to 1.
Updated•1 year ago
|
Comment 1•1 year ago
|
||
The severity field is not set for this bug.
:jwatt, could you have a look please?
For more information, please visit BugBot documentation.
Comment 2•1 year ago
|
||
Weird the cascade would fail for this specific property.
Comment 3•4 months ago
|
||
Oh, <br> has line-height: 5 which is affecting the layout.
Comment 4•4 months ago
|
||
I think we need to take parent's font metric (setting font-size on br has a similar issue) and line height here.
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Comment 5•4 months ago
|
||
Updated•4 months ago
|
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/60517 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Updated•3 months ago
|
Description
•