-
Notifications
You must be signed in to change notification settings - Fork 77
declaring variable as in postcss-preset-env example not working #200
Comments
Looks like the plugin only supports variables within :root. According to the spec some more matchings would work. Of course their are meant to be applied directly one the DOM, but actually they should work to some extent:
Expected:
Actual:
|
@masi see the old version of README - https://github.com/postcss/postcss-custom-properties/tree/cdb1fb0b415fd14f1f78361274f7667d4d7640f7#notes
Looks like this explanation was removed in this commit 6ef218d |
Perhaps the note could be extended to what subset is supported. I reckon only definition within
|
Works as expected. Note was added to README |
Under https://preset-env.cssdb.org/features#custom-properties
we have the following example:
Although this doesn't seem to work and variables are not rewritten.
The only way to get this working was to define the variable under
:root
?Perhaps I am missing something or can the example listed indeed be achieved?
Thanks
The text was updated successfully, but these errors were encountered: