- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Wed, 29 Jan 2025 18:51:12 +0000
- To: public-css-archive@w3.org
tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-overflow-5] Making ::scroll-marker existence unconditional? == 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-marker` existence 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"](https://drafts.csswg.org/selectors/#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: ![Image](https://github.com/user-attachments/assets/47ec4c1d-dd51-4e4a-91b5-d3347d72ef01) 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: ```css .carousel li:has(~ li::scroll-marker:target-current)::scroll-marker { opacity: 1; } ``` 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. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11600 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 29 January 2025 18:51:13 UTC