Re: [csswg-drafts] [css-env-2] env(scrollbar-inline-size) (#4691)

As a sidenote, with an `@property` and container query length units we can kinda work around the issue like this: https://codepen.io/kizu/pen/WNLjJvq — would currently work in Chrome and Safari. Won't work in Firefox when there is another container around the element which we want to apply our `--vw` to, but can work everywhere if we're sure the topmost wrapper would be the only container.

But yes, this requires an additional wrapper around everything, and is more cumbersome. But can be a good viable workaround as soon as `@property` would land in Firefox, and this could be used for any scrollable containers, not only for the viewport, though would require two containers to set it up.

(posting as a way to demonstrate a future workaround, and as something people could use for testing how the potential APIs would work in CSS)

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


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

Received on Tuesday, 12 September 2023 09:51:23 UTC