[csswg-drafts] [css-lists][css-pseudo] position:marker as layout model for list-style-position:outside list item markers (#3771)

MatsPalmgren has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-lists][css-pseudo] position:marker as layout model for list-style-position:outside list item markers ==
https://drafts.csswg.org/css-lists-3/#position-marker
> An element with position:marker counts as absolutely positioned.

Given the above quote, I have some doubt regarding using `position:marker` as a description of how layout works for `list-style-position:outside` list item markers. Making it positioned changes the [stacking level](https://www.w3.org/TR/CSS22/zindex.html) in which it is painted. Given how prevalent `<li>` is on the web, I strongly doubt this would be web-compatible. Non-positioned content that happens to overlap a `::marker` must paint on top of it.

FYI, Gecko has implemented `::marker` and we made the following tweaks for it to make it compatible with the legacy rendering:
1. when the list item has `list-style-position:outside`, the `display` value of the `::marker` pseudo-element is [blockified](https://drafts.csswg.org/css-display/#blockify)
2. the `::marker` box inline-size shrink-wraps by default
3. the `::marker` box inline-axis margins are **not** calculated per the [CSS2 block-level algorithm](https://www.w3.org/TR/CSS22/visudet.html#blockwidth) (because that would typically make the inline-end margin very large and thus misposition the `::marker`)

I think those tweaks are non-controversial since I think they would fall out from making it absolutely positioned anyway, as the spec suggests, so I think it's within the intent of the spec regarding the layout result.  But, we do not treat it as absolutely positioned in our box tree.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3771 using your GitHub account

Received on Thursday, 28 March 2019 11:36:56 UTC