You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the existence of ::scroll-marker-group is dependent on the scroll container having a non-none value for scroll-marker-group. <https://drafts.csswg.org/css-overflow-5/#scroll-marker-group-pseudo> Then ::scroll-markerexistence is dependent on its corresponding::scroll-marker-group` existence (+ markup information defining the element as being a "scroll marker").
This prevents us from making ::scroll-marker a ":has-allowed pseudo-element", since its existence is determined by style, and using :has(::scroll-marker) would allow cyclic styling loops. This, unfortunately, means it seems hard to define examples like this:
Note that the scroll-markers before the :target-current one are solid white; the current and subsequent ones are partially transparent. @argyleink tried to achieve this with:
But it doesn't work because ::scroll-marker isn't marked as being valid in :has().
So, question: can we make the existence of ::scroll-marker (and perhaps ::scroll-marker-group) unconditional, based just on the markup information? We'd change the wording so the box generation is dependent on styling as currently specified, but the pseudo-element would be treated as existing regardless, so we could make ::scroll-marker a ":has-allowed pseudo-element", and Adam's code would work.
The text was updated successfully, but these errors were encountered:
Currently, the existence of
::scroll-marker-group
is dependent on the scroll container having a non-none
value forscroll-marker-group. <https://drafts.csswg.org/css-overflow-5/#scroll-marker-group-pseudo> Then
::scroll-markerexistence is dependent on its corresponding
::scroll-marker-group` existence (+ markup information defining the element as being a "scroll marker").This prevents us from making
::scroll-marker
a ":has-allowed pseudo-element", since its existence is determined by style, and using:has(::scroll-marker)
would allow cyclic styling loops. This, unfortunately, means it seems hard to define examples like this:Note that the scroll-markers before the :target-current one are solid white; the current and subsequent ones are partially transparent. @argyleink tried to achieve this with:
But it doesn't work because
::scroll-marker
isn't marked as being valid in:has()
.So, question: can we make the existence of
::scroll-marker
(and perhaps::scroll-marker-group
) unconditional, based just on the markup information? We'd change the wording so the box generation is dependent on styling as currently specified, but the pseudo-element would be treated as existing regardless, so we could make::scroll-marker
a ":has-allowed pseudo-element", and Adam's code would work.The text was updated successfully, but these errors were encountered: