postcss / postcss-custom-properties

Use Custom Properties in CSS
https://postcss.github.io/postcss-custom-properties
MIT License
597 stars 77 forks source link

Fix appendVariables appending duplicate vars #116

Closed josephschmitt closed 6 years ago

josephschmitt commented 6 years ago

When the appendVariables and preserve options are set, it would append both JavaScript-provided variables as well as variables declared in CSS, leading to duplicates. This will filter out non-JS variables so we don't end up with duplicate declarations.

Fixes #114

jonathantneal commented 6 years ago

I can’t review this until tonight, but in skimming this code it looks like exactly the fix we need. Thank you! Could you look into the Travis CI failure?

josephschmitt commented 6 years ago

@jonathantneal no worries, thanks! Looks like my lines are too long. Will fix now.

josephschmitt commented 6 years ago

🎉