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

> > * Doesn't appear to have an easy way to do progressive enhancement, see [this example](https://codepen.io/afrehner/pen/dyyVYyK) - (I tested in firefox)
> 
> FWIW `height: calc(100vh - env(foo, 0px));` does work. That's just because `calc(100vh - 0)` is invalid, because `0` in calc get's parsed as a `<number>`, not a `<length>`, and you can't subtract `<length>` and `<number>`s.
> 
> That may be something worth special-casing / changing to make work? Not sure.

For clarity, I want these styles to _not_ apply in cases where the browser doesn't understand them, and the problem is that the browser actually does try to apply them even if it doesn't understand them. 

For example, if you look at the `height: 100vhc` example in the browser dev tools, you'll see it's crossed out because the browser doesn't understand it. That's what we want. 

But in the env example, the browser thinks it understands it and tries to apply it, which is actually what we _don't_ want in this case. 

If that makes sense?

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

Received on Wednesday, 30 October 2019 01:42:14 UTC