@tabatkins Shouldn't I be able to do something like `@βmedia (max-width: var(--w)) { /* stuff */ }`? :( codepen.io/thebabydino/pen/Dβ¦
1
@thebabydino @tabatkins What element does --w come from, and which CSS rules are used when deciding its value?
1
@davidbaron @tabatkins :root { --w: 500px }
.boo { width: var(--w); } /*ok*/
@βmedia (max-width: var(--w)) { .boo { color: tan; } } /*NO:(*/
2
@thebabydino @tabatkins Yes, but why do you expect the @ media rule to reach in and grab styles from the root or other element?
2
1
@thebabydino @tabatkins And the perf cost of the browser maintaining a separate cascade just for the without-@ media style on the root?
Jun 8, 2014 Β· 12:13 AM UTC
1

