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
536 stars 62 forks source link

Extra declaration for pseudo class #40

Open asvny opened 8 years ago

asvny commented 8 years ago

Input:

:root {
    --color: blue;
}

.c:focus {
    --color: red;
    border-color: var(--color);
}

Output:

.c:focus {
    border-color: blue;
}

.c:focus:focus {
    border-color: red;
}

Expected:

.c:focus {
    border-color: red;
}
MadLittleMods commented 7 years ago

Thanks for the report :grinning: PRs are welcome

I checked this out a couple days ago but thought I would give a reply in case you didn't see the edit to your message.

The extra pseudo class doesn't affect the functionality but is certainly undesired.

andreasisaak commented 7 years ago

I run into the same problem :)