-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Labels
Closed Accepted by Editor Discretioncss-lists-3Current WorkCurrent Workcss-pseudo-4Current WorkCurrent Work
Description
CSS Lists defines ::marker as
Markers are placed at the beginning of their originating element’s content, before the
::beforepseudo-element (if it exists).::markerpseudo-elements are inline by default, though certain values forlist-style-positionon the list item can make the marker box positioned, which can have an effect on the computed value of display.
This seems to imply that, as inline content, ::marker is inside ::first-line by default.
But I did a test (https://jsfiddle.net/x6416ote/) and browsers don't do this.
ul { color: red; list-style: inside }
li::first-line { color: green; background: yellow }
- All Firefox, Chrome and Edge paint the marker with red color. It does not inherit green color from
li::first-linedespite theoretically being an inline content at the beginning of theli. - On Firefox, the yellow background starts after the bullet. So it seems what happens is that the bullet is always treated as out-of-flow, and thus is not inside
::first-line. - On Chrome and Edge, the yellow background starts before the bullet. So it seems the bullet is inside
::first-linedespite not inheriting from it. - Interestingly, on Edge, the marker has green color when it has
list-style-position: outside, despite theoretically being an out-of-flow content and the yellow background starting after the bullet.
Metadata
Metadata
Assignees
Labels
Closed Accepted by Editor Discretioncss-lists-3Current WorkCurrent Workcss-pseudo-4Current WorkCurrent Work