- From: Corey Worrell via GitHub <sysbot+gh@w3.org>
- Date: Tue, 05 Feb 2019 00:40:11 +0000
- To: public-css-archive@w3.org
@tabatkins Not to beat a dead horse, but I do think this is important to get right. I just don't understand why viewport units aren't handled *exactly* the same as percentage units, as if the element is a direct child of the `body` for example. ```html <html style="overflow-y: scroll; /* avoid page shift when scrollbar appears */"> <body style="margin: 0; padding: 0;> <div style="width: 100%;">This is 100% wide, looks good, yay!</div> <div style="width: 100vw;">WTF, horizontal scrolling now?</div> </body> </html> ``` That example alone makes no sense to me. The purpose of viewport units was to be able to reference a percentage of the width of the "initial containing block", instead of only being tied to using a percentage of its parent element. Why would one want to "draw" an element "under" the scrollbar and force a horizontal scrollbar? If you absolutely needed that for whatever reason, *that* should be the exception, and handling it would simply involve hiding the overflow however you see fit (`overflow-x: hidden` or `overflow-y-hidden`). I have read through the IRC discussions and do not see any solid reason this was dropped. -- GitHub Notification of comment by coreyworrell Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1766#issuecomment-460470368 using your GitHub account
Received on Tuesday, 5 February 2019 00:40:12 UTC