-
Notifications
You must be signed in to change notification settings - Fork 669
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
[css-lists] Interaction of ::marker with other pseudo-elements. #3826
Comments
This is apparently wrong, I don't know what I was testing, but loading that again on WK doesn't show the red marker. So I think those markers shouldn't be addressable by selectors. But the third question is probably worth answering. |
And the first, probably... I'd prefer if they wouldn't generate markers. Because then you don't have to have pseudo-elements generating other pseudo-elements, even if those can't be addressed by content. |
Basically, if we generate those markers, the UA sheet for marker needs to be defined in some magic way that also matches pseudo-element markers, somehow. I'd rather avoid that. EDIT: I've noticed that that UA rule only applies to |
I don't think you should take that UA sheet too seriously. It's wrong in a number of ways. I'm guessing its purpose is mainly to explain how the CSS built-in |
Regarding your questions, I think |
It seems to me then that |
No, because |
@MatsPalmgren would you then suggest that selectors like |
Right, I'm not really suggesting any particular syntax, but we might want to add a selector to address nested pseudos like that in the future so I think it's premature to forbid (But yes, |
I think most of this was already resolved in #1793 (comment)
|
Gecko's implementation obviously does, but has a bug when changing the styles. I've reported that as bug 1544959.
In the Firefox implementation at least Sebastian |
Agree with all of Mats' answers. ::before/after generate ::marker, 'display' doesn't apply to ::marker, and a |
The way I read @MatsPalmgren is that display should apply to marker (when using |
Right, as I've said before, I'm opposed to introducing arbitrary unnecessary styling restrictions on There are still some uncertainty about the exact layout model for outside markers (#3771), so feel free to add an ISSUE note about that in the spec, but my gut feeling is that we can allow pretty much all of CSS on those too. We definitely should allow I don't see a reason treat |
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> Topic: ::marker vs other pseudo-elements<fantasai> github: https://github.com//issues/3826 <fantasai> I agree with https://github.com//issues/3826#issuecomment-483320040 <fantasai> emilio: I think there was some confusion of whether 'display' applies to markers <fantasai> fantasai: display doesn't currently apply to markers <fantasai> fantasai: and I don't think it should until marker layout is fully defined <fantasai> fantasai: and its interaction with display is also defined <fantasai> TabAtkins: Mats is arguing for much more than display <fantasai> TabAtkins: He's arguing for marker to take all properties, like ::before/::after <fantasai> TabAtkins: Is there a reason to stop at display or re-litigate after? <dbaron> ScribeNick: florian <florian> fantasai: the reason we have a limited list of properties is that because we don7t know how marker layout works <florian> fantasai: so allowing these properties without knowing what they do is bad <florian> fantasai: we also don't know the size of the box, so any property that makes that visible is a problem <florian> fantasai: we don't know if line-height plays a role... many other properties have the problem <florian> fantasai: there are implementation specific answers, but so far they're not exposed <florian> fantasai: so if we expose them, me might accidentally lock compat on whatever ships first <florian> fantasai: so we should not <florian> emilio: makes sense to me, will apply that to firefox <florian> fantasai: for now we just allow text related properties <florian> fantasai: eventually we want to relax that, but only after layout is defined <fantasai> https://www.w3.org/TR/css-pseudo-4/#marker-pseudo <florian> proposed resolution: don't expand the list of props that apply to ::marker <florian> RESOLVED: don't expand the list of props that apply to ::marker <fantasai> It would probably be OK to add more properties from css-text/text-decor <fantasai> those that apply to inlines <emilio> github: https://github.com//issues/3815 <emilio> github: https://github.com//issues/3826 |
Emilio responded in the minutes, so marking Commenter Satisfied. |
A few different questions that occurred to me, that should probably be tested and clarified on the spec, and they interact with each other.
Do
::before
and::after
generate markers?In #3766 it was clarified that they increment the list-item counter and are considered list items. But do they generate marker boxes?
Browsers generally do (Edge didn't use to though, so we may have some leeway). It's a bit weird that we're generating nested pseudo-elements.
If they do... Do those markers generated by pseudo-elements match selectors from the page?
WebKit and Gecko's implementation do show two red bullets here:
But then that means that you can address a marker generated by a pseudo-element with selectors. Which is inconsistent in the sense that it doesn't happen for
::before
and::after
. Which carries me to the next question...If they do... Does
display
apply to::marker
? And thus, can::marker
boxes be list items?If we allow
content
on marker, they can just be a normal box, affected bydisplay
, and thus havedisplay: list-item
on them. If generated markers can be list items, then:list-item
counter?I really hope the answer to these two question is "no", but otherwise, how should this work?
I think
::marker
shouldn't be a list-item, even if it's a box withdisplay: list-item
like @fantasai clarified in #3766, and that it should not increment the list-item counter nor generate other markers.The text was updated successfully, but these errors were encountered: