Re: [csswg-drafts] Setting the primary scrolling direction for a scroll container (#10060)

> I don't understand. Wasn't the behavior taking into consideration both `overflow` and `writing-mode`? These are both CSS properties.
> 

Sorry for being unclear. When I said "CSS unaware", I meant we hadn't introduced any CSS private property to do `autodir`, so `autodir` has nothing to do with CSS's extra assistance. Let me be more specific: `autodir` does "use" `writing-mode` and `overflow` indirectly(without the concept of CSS), in some way, in some condition. But that's not the key point. The key point is: **No selectiveness**. We cannot _selectively_ turn on `autodir` for some elements in the document, while turning off `autodir` for some other elements in the same document. Because we do not have such a CSS property that _selectively_ does it.

> Suppose the gallery is vertical instead of horizontal. Why should that be different? Either the user wants to scroll through the image gallery or they don't. Laying out the gallery horizontally vs vertically shouldn't make a difference to whether scroll events are sent to the gallery or the main page.

It does matter based on whether `autodir` is enabled.

```
<article class="very-tall"> <!--overflows vertically-->
    <img class="very-wide" ...> <!--overflows horizontally-->
</article>
```

If `autodir` is disabled, a user can scroll the `<article>` from top to down, using plain wheel scroll(plain means no Shift), without the possibility of accidentally falling into the <img>. Because plain wheel scroll will not be changed by disabled `autodir`, so, the `<img>` is "essentially an unscrollable element" from the perspective of plain wheel scroll.

If `autodir` is enabled, then there's possibility of falling into the `<img>`.

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


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

Received on Tuesday, 9 April 2024 04:03:26 UTC