MadLittleMods / postcss-css-variables

PostCSS plugin to transform CSS Custom Properties(CSS variables) syntax into a static representation
https://madlittlemods.github.io/postcss-css-variables/playground/
Other
536 stars 62 forks source link

Why i get undefined value #123

Closed tigerHeeJS closed 4 years ago

tigerHeeJS commented 4 years ago

version:

"postcss-css-variables": "^0.17.0"

use plugin:

1

result:

11
MadLittleMods commented 4 years ago

@tigerHeeJS Please provide your input CSS, the actual result, and your expected result

tigerHeeJS commented 4 years ago

Sorry, I saw other issues and learned that the reason is that the postcss-css-variables can't automatically recognize DOM structure. I use it like:

.a{
  --color1: #ff6100;
}
.b{
color: var(--color1);
}