Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Define variables in media queries? #145

Open
JamesCoyle opened this issue Aug 14, 2016 · 0 comments
Open

Define variables in media queries? #145

JamesCoyle opened this issue Aug 14, 2016 · 0 comments

Comments

@JamesCoyle
Copy link

It seems this doesn't work but should according to the spec AFAIK. I read about it here.

@media screen and (max-width: 1280px) {
    :root {
        --total-width: 1000px;
    }
}

The above code should change the value of the --total-width variable if the media query is active. I believe when supported the browser should be able to handle this. To make it work with Myth though it would require pulling every definition where the variable is used up into the media query.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant