-
Notifications
You must be signed in to change notification settings - Fork 719
[css-display][css-pseudo] Is ::marker created by display:list-item or does it always exist? #1793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ah, I was inclined to say they always exist (but only generate boxes when I mean, |
About #4, I thought that CSS debugging tools that expose the element tree might prefer it to be finite. However, they annoyingly tend to hide tree-abiding pseudo-elements that don't generate boxes, so maybe they don't care. |
I have been thinking that the element tree already depends on the cascade because of If you have So if |
Discussing with @fantasai, we agree that option 2 is best (::marker always exists, but can only be originated by elements, ::before, and ::after (and future pseudos of similar style)). Agenda+ for verification from the WG. |
I agree option 2 makes the most sense. |
I would prefer limiting I don't have a strong opinion on whether |
^ FWIW I'm fine with that, and didn't see a strong reason why we would want to change it. |
By the way, @tabatkins argument against 1 doesn't speak much to me because we insert the list-item bullet (or a proxy for it) in the first line box of the list-item to make sure its line-height is big enough to render the marker properly. So, in effect, we already have a requirement to wait for full cascade to entirely determine the tree in Edge and Chrome. |
Yeah, ::marker is definitely still limited to just list-items; it's suppressed otherwise. |
The Working Group just discussed
The full IRC log of that discussion |
I believe this is now edited into css-lists-3. Let me know if css-pseudo-4 needs additional clarifications? @Loirooriol @FremyCompany @tabatkins |
@fantasai I don't see this in css-lists-3, where does it say for instance that ::marker cannot have a nested ::marker? |
@fantasai I think https://drafts.csswg.org/css-lists/#list-item could clarify that ::before and ::after can also be list items. |
@Loirooriol Added a note about the existence of ::before::marker and ::after::marker @FremyCompany ::marker cannot accept
|
|
That's what Chromium does, if you enable experimental flags, the parser accepts
Seems reasonable. Or more precisely, I would just remove |
The CSS Working Group just discussed
The full IRC log of that discussion |
…ay loses its 'list-item'. #1793 (comment)
::before
and::after
pseudo-elements always exist in the element tree, but most times they don't generate boxes in the box tree becausecontent
computes tonone
by default.Is it similar for
::marker
pseudo-elements? Do they always exist, but they only generate boxes if thedisplay
of the originating element has thelist-item
keyword? Or do::marker
pseudo-elements only exist if the originating element has thelist-item
keyword?CSS Display handwaves the difference between the
::marker
pseudo-element and the marker box generated by it, so it's not clear. CSS Pseudo isn't clear either.The difference matters because Firefox and Chrome allow
::marker
pseudo-elements to be originated by some tree-abiding pseudo-elements. So if::marker
always exist, this could potentially mean that the element tree has an infinite depth, which doesn't sound much right.I see various possibilities:
::marker
pseudo-elements are only created whendisplay
has thelist-item
keyword.::marker
always exist but are only originated by elements,::before
, and::after
. They can't be originated by other::marker
.::marker
always exist but are only originated by elements. Like::before
and::after
, they can't be originated by other pseudo-elements. This would be a breaking change for Firefox and Chrome.::marker
always exist and can be originated by elements or any tree-abiding pseudo-elements. The element tree has an infinite depth, but in practice this isn't much problematic because the box tree is finite.The text was updated successfully, but these errors were encountered: