W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

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

From: Anthony Frehner via GitHub <sysbot+gh@w3.org>
Date: Wed, 30 Oct 2019 01:42:12 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-547702204-1572399731-sysbot+gh@w3.org>
> > * 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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:55 UTC