darrenjacoby / postcss-root-parse-var

Parse a custom property from `:root` or another selector to a static value
MIT License
1 stars 0 forks source link

At-rules support #1

Open mdmoreau opened 3 years ago

mdmoreau commented 3 years ago

Thanks for the great plugin! Any chance you'd consider adding at-rules parsing support? I'm trying to use this alongside postcss-mixins, but it looks like parse-vars() does nothing when passed as a variable there.

@mixin demo parse-var(--color);
mdmoreau commented 3 years ago

Sorry - think this might be more of an issue with postcss-mixins. If I use an older version of that and run this plugin after, it seems to work. Still might be nice to be able to run parse-var() first, but feel free to close this if that's not something you're interested in. It also might have to deal with this plugin not being updated for PostCSS 8 support yet as well, haven't done much testing. Thanks!

darrenjacoby commented 3 years ago

Hey @mdmoreau ,

The plugin hasn't been tested with Sass, however, you could try running the PostCSS plugin prior to running Sass. Technically, it should work then.