MadLittleMods / postcss-css-variables

PostCSS plugin to transform CSS Custom Properties(CSS variables) syntax into a static representation
https://madlittlemods.github.io/postcss-css-variables/playground/
Other
540 stars 62 forks source link

Option 'preserve' doesn't work inside @media rules #42

Closed muftiev closed 8 years ago

muftiev commented 8 years ago

input css with option preserve = true

@media screen and (max-width: 700px) {
    :root {
        --color-link: purple;
    }
}
.link {
    color: var(--color-link);
}

output

@media screen and (max-width: 700px) {
    .link {
        color: purple;
    }
}

Expected output

@media screen and (max-width: 700px) {
    .link {
        color: purple;
        color: var(--color-link);
    }
}