-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
So I have my CSS variables declared like so (from the end of Phillip Walton article http://philipwalton.com/articles/why-im-excited-about-native-css-variables/):
@media (min-width: 1px) and (max-width: 799px) {
:root {
--navbar-padding: 5%;
}
}
@media (min-width: 800px) {
:root {
--navbar-padding: 1rem;
}
}
@media (min-width: 992px) {
:root {
--navbar-padding: 3rem;
}
}This CSS variable setup works perfectly, with the media queries being rendered in the correct order. When I run postcss-css-variables, however, the media queries get outputted in the opposite order, and my production file renders incorrectly because of overriding. Is there something I am doing wrong?
@media (min-width: 992px) {
.navbar {
padding: 1rem 3rem;
}
}
@media (min-width: 800px) {
.navbar {
padding: 1rem 1rem;
}
}
@media (min-width: 1px) and (max-width: 799px) {
.navbar {
padding: 1rem 5%;
}
}vincentorback, saibs, danschultz, freesteph, tnunes and 1 more
Metadata
Metadata
Assignees
Labels
No labels