postcss / postcss-custom-properties

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

Limited to one file? #50

Closed kevinSuttle closed 8 years ago

kevinSuttle commented 8 years ago

In my experience, it's only possible to have one :root declaration, and that usually means one file (doesn't seem to work with postcss-imports). Am I missing something?

MoOx commented 8 years ago

This is totally wrong, you can have as much :root as you want. You can try in http://cssnext.io/playground/ for example. Lot's of libraries like cssrecipes use multiples declarations and work fine.

kevinSuttle commented 8 years ago

Thanks for confirming, @MoOx.

tomasdev commented 6 years ago

if you do it via @import it ends up triggering a warning, postcss-custom-properties: /Users/.../src/style/index.css:14:5: variable '--gvar' is undefined and used without a fallback even though output works