Media queries do not support CSS Custom Properties in calc()
Reported by
shospoda...@gmail.com,
Feb 11 2018
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3344.0 Safari/537.36 Steps to reproduce the problem: 1. Open the test demo https://codepen.io/malyw/pen/BJXGzv 2. Check the "Media queries with calc() and CSS Custom Properties: " section What is the expected behavior? calc() with CSS Custom Properties media queries are applied What went wrong? No calc() and CSS Custom Properties media query is applied Did this work before? No Does this work in other browsers? No Recently Chrome the support of calc() in Media quesries: https://www.chromestatus.com/feature/5643732019838976 One of the main developer requests for this was the ability to use CSS Custom Properties in Media Queries: https://bugs.chromium.org/p/chromium/issues/detail?id=421909#c19 Unfortunately, the calc() support was shipped only for the <length> values Chrome version: 66.0.3344.0 Channel: canary OS Version: OS X 10.13.3 Flash Version:
,
Feb 12 2018
,
Feb 12 2018
Marking this available; perhaps if someone can find a section of the spec or go to the WG with this issue we can go ahead.
,
Feb 12 2018
,
Apr 29 2018
Marking this as WontFix per https://drafts.csswg.org/css-env-1/ and https://github.com/w3c/csswg-drafts/issues/1693. The intro to the Environment Variables proposal draft states: Because environment variables don’t depend on the value of anything drawn from a particular element, they can be used in places where there is no obvious element to draw from, such as in @media rules, where the var() function would not be valid. env() would thus be able to be used in media queries, but per that text it seems like var() is explicitly designed to not be able to. I would suggest following https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/ZS1mEwvN-5E and bug 825890 for updates on env() in Chrome. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by cnardi@chromium.org
, Feb 12 2018