Re: [csswg-drafts] [css-values-4] Add vhc value (#4329)

I’m in favor of adding the new `vhc` unit. In many projects we need both: the viewport height with and without chrome. Currently we’re patching this with JS.  

I just realized we have  to consider the logical viewport-percentage lengths `vi` and `vb` as well. We could then end up with three new units; `vhc`, `vic` and `vbc`. Final names to be bikeshed of course. 

Maybe @bokand and @AmeliaBR s idea of exposing environment variables would be more manageable than three new units? This would also be more in line with @argyleink s [env(scrollbar-inline-size)](https://github.com/w3c/csswg-drafts/issues/4691) solution for scrollbars.

`
height: calc(100vb - env(inset-collapsible-block-size))
`

This would also open up the possibility to add `current-inset` environment values to solve the third use case from @AmeliaBR : "A dynamic layout that always exactly fits the current viewport, regardless of how many browser widgets are surrounding it."


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


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

Received on Sunday, 21 March 2021 09:15:19 UTC