New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-overflow-4] effect of gutters on viewport units #5254
Comments
cc: @felipeerias |
@frivoal : would the |
Good question. I'd say yes, so that |
I've seen things as outlandish as introducing new units to css just to avoid changing the root problems with the default implementation of vh/vw, both on desktop and mobile. Why don't we implement something like the box-sizing rule, but for scrollbars, to switch whether or not the scrollbar or chrome is considered a part of the viewport or not? There doesn't need to be a debate on how vw/vh should work if the individual user can decide for themselves. Call it something like " |
https://drafts.csswg.org/css-values/#viewport-relative-lengths says:
This is fine if we have overlay scrollbars, and
scrollbar-gutter
isauto
orstable
, since no space is consumed for the scrollbar anyway.This seems regrettable, but probably unavoidable, if we have classic scrollbars and
scrollbar-gutter
isauto
, since the presence or absence of scrollbars will depend on layout, and having the viewport units depend on layout is problematic.However, if we have classic scrollbars and
scrollbar-gutter
isstable
(oralways
, which does the same thing in the case of classic scrollbars), it would seem much preferable for the viewport percentage units to be relative to the ICB as reduced by the always-present gutter.For overlay scrollbars with an
always
scrollbar-gutter
, I suspect it should they should also be relative to the ICB as reduced by the always-present gutter, but I am less sure, and the answer might depend on the resolution to #5253.The text was updated successfully, but these errors were encountered: