Re: [csswg-drafts] [mediaqueries] Scroll bar type query (#7697)

This type of media query came up during https://github.com/web-platform-tests/interop-2022-viewport/issues/15

Combined with [`env(scrollbar-inline-size)`](https://github.com/w3c/csswg-drafts/issues/4691#top) – which would return the default classic scrollbar size – authors could combine both in order to work around [the “100vw is causing pointless horizontal scrollbars” problem](https://github.com/w3c/csswg-drafts/issues/6026):

```css
@media (scrollbars: overlay) {
   --100vw: 100vw;
}
@media (scrollbars: classic) {
   --100vw: calc(100vw - env(scrollbar-inline-size));
}

el {
  width: var(--100vw);
}
```

This “solution”, however, does assume that the root element is currently showing a vertical scrollbar.

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


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

Received on Monday, 14 November 2022 22:16:14 UTC