postcss / postcss-custom-properties

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

allow vars to be defined in either :root or html #119

Closed halmos closed 5 years ago

halmos commented 6 years ago

This a proposed solution to issue #100. It allows variables to be defined in either :root or html. It also adds a postcss option called root that allows control over which node variables will be set in. If the variables, appendVariables and root options are set, the variables will be appended to the css in the specified root (e.g. either :root or html). Two unit tests have been added for these new features as well.

jonathantneal commented 6 years ago

Hey, I haven’t heard back from you, so I may attempt to rewrite this plugin soon to address this.

halmos commented 6 years ago

Hi Jonathan, Sorry for slow reply. I'd be happy to put more time into this next week, but if you're planning a re-write with other feature considerations anyway, then please feel free to incorporate this feature with the others.

jonathantneal commented 5 years ago

This will be resolved by v8. https://github.com/postcss/postcss-custom-properties/pull/132