[csswg-drafts] [cssom-view] Should `scrollParent` allow axis filtering? (#12731)

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom-view] Should `scrollParent` allow axis filtering? ==
#12289 allows boxes to only be scrollable in one axis.

So I suspect authors may want to query the scroll container that is scrollable in a specific axis.

Maybe they can just do

```js
let scrollParent = element.scrollParent;
while (scrollParent) {
  if (getComputedStyle(scrollParent).overflowY != "clip") {
    break;
  }
  scrollParent = element.scrollParent;
}
```

But should we instead allow something like `element.scrollParent({axis: "y"})`?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12731 using your GitHub account


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

Received on Thursday, 4 September 2025 17:30:23 UTC