::marker does not support CSS property line-height
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: bugzilla, Assigned: emilio, Mentored)
References
Details
(Keywords: good-first-bug)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Steps to reproduce:
Set the line-height
property on a list marker using this:
li::marker {
content: '*';
line-height: 30px;
}
Actual results:
The vertical position of the marker stays the same whatever value line-height
has. The value for line-height
does not matter, 50px
or 2
also have no effect.
The result is that the character is positioned too high, above the center of the first line of the list item content.
Expected results:
The vertical position should change depending on the value for line-height
.
That is based on this MDN description, which states that ::marker
supports All font properties, which explicitly lists line-height
as one of the properties.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
MDN is not the spec. The marker spec mentions only the css-fonts spec, but line-height doesn't live in the fonts spec, it lives here. The marker spec really says:
Inheritable properties that apply to text can be set on the ::marker pseudo-element: these will inherit to and take effect on its text contents.
Which is quite hand-wavy IMO :/
Anyways, this is probably not problematic to support. Should be a matter of special-casing line-height here, so a one-liner, and adding a test if there isn't one.
At the very least there's testing/web-platform/tests/css/css-pseudo/marker-line-height.html.ini
and css/css-pseudo/parsing/marker-supported-properties.html
that should have new passes.
Assignee | ||
Comment 4•2 years ago
|
||
There are other properties tested there which should be straight-forward to support too.
Reporter | ||
Comment 5•2 years ago
|
||
MDN is not the spec.
Perhaps change the text on MDN?
Assignee | ||
Comment 6•2 years ago
|
||
Updated•2 years ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fdb8148fec20 Apply line-height to ::marker. r=layout-reviewers,jfkthame
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/c0f50e1142c9 set some line-height/font marker test steps as passing. CLOSED TREE
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/97ee782e42e8 Make marker-line-height pass reliably in all platforms.
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/32459 for changes under testing/web-platform/tests
Comment 11•2 years ago
|
||
Pushed by mlaza@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/cc33400f0ff8 Make marker-line-height pass reliably in all platforms.
Comment 12•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fdb8148fec20
https://hg.mozilla.org/mozilla-central/rev/c0f50e1142c9
https://hg.mozilla.org/mozilla-central/rev/cc33400f0ff8
Upstream PR merged by moz-wptsync-bot
Comment 14•2 years ago
|
||
bugherder |
Description
•