Re: [csswg-drafts] [css-overflow] add method to prevent elements from contributing to scrollable overflow (#8361)

To summarize the discussion, there are two behaviors being discussed here:
1. Whether or not a given element contributes to the scrollable overflow.
2. What the used rectangle for scrollable overflow and scrolling operations for this element should be. E.g. should it ignore the element's transform.

I think we are all agreed that these are both valuable behaviors to be able to control. The main point of contention was whether this would be 1 or 2 properties. To help I'll suggest possible properties / values (of course welcome bikeshedding).

As one property, this would look something like this:
```css
overflow-contribution: normal | ignore-transform | none;
```
The question is if we specify none, what are the effects on scrolling / snapping operations? Would we prevent snapping / scrolling to this element? If not, what if you want the element to not contribute to scrollable overflow and ignore transforms for scroll related operations?
A counter-point to this, is when you want to not contribute to scrollable overflow, the UA won't guarantee that this element is reachable which may mean that the developer doesn't intend the user to need to scroll to this element, so maybe it would be reasonable to treat the element as purely decorative?

As two properties, these would be specified independently, e.g.:
```css
overflow-contribution: normal | none;
scroll-align: normal | ignore-transform;
```
Do all combinations of this make sense? Probably, you can imagine how these could be applied independently, but are there practical use cases where we want to scroll to an element that doesn't contribute to scrollable overflow? Perhaps an overly large image that you don't want to introduce horizontal scrolling for?

Alternately, a third option could be to have a single property with multiple values, but this may just suggest a need for multiple longhand properties, e.g.
```css
overflow-contribution: <normal | none> || <auto | ignore-transform>?;
```

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8361#issuecomment-2166513766 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 13 June 2024 18:29:23 UTC