- From: Robert Flack via GitHub <sysbot+gh@w3.org>
- Date: Thu, 13 Feb 2025 21:36:05 +0000
- To: public-css-archive@w3.org
flackr has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-overflow-5] Should ::scroll-marker pseudo-elements within skipped content-visibility: auto elements be discovered? == If you have `::scroll-marker` pseudo-elements declared on elements within `content-visibility: auto`, what should happen? Consider a simple demo ([view demo page](https://codepen.io/flackr/pen/ogNgaRb)): ```html <style> .scroller { scroll-marker-group: after; } .scroller > * { content-visibility: auto; } h1::scroll-marker { content: ""; } </style> <div class=scroller> <div><h1>1</h1></div> <div><h1>2</h1></div> <!-- ... --> <div><h1>n</h1></div> </div> ``` We have two main options: 1. Ignore them when they are [skipped](https://www.w3.org/TR/css-contain-2/#skips-its-contents). This falls naturally out of the spec since skipped objects have style containment and so we shouldn't discover these markers, however this would result in the markers in the marker group changing as you scroll based on what is currently skipped. Authors could work around this by ensuring that they create markers on or above the element with `content-visibility: auto` (e.g. on the `<div>` elements in the above example). 2. Spec that we should discover these. We could do this in a similar way to how the spec requires that [content-visibility: auto is still discoverable to find in page, tab order, etc](https://www.w3.org/TR/css-contain-2/#valdef-content-visibility-auto). In particular, this means we would need to: 1. Always compute style within `content-visibility: auto` when the nearest ancestor scroll container is not skipped and has a non-none `scroll-marker-group` property value. 2. Either compute layout, or define that when [computing the :target-current ::scroll-marker](https://drafts.csswg.org/css-overflow-5/#active-scroll-marker) that we use the [scroll into view position](https://drafts.csswg.org/cssom-view-1/#determine-the-scroll-into-view-position) of the nearest non-skipped ancestor. 3. Consider how to allow this considering the [skipped content](https://www.w3.org/TR/css-contain-2/#skips-its-contents) is supposed to be `contain: style layout paint size`. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11705 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 13 February 2025 21:36:06 UTC