postcss / postcss-custom-properties

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

Custom properties inside classes #47

Closed lukasoppermann closed 8 years ago

lukasoppermann commented 8 years ago

Hey,

if I am not mistaken the following should be possible (currently works in chrome).

.class{
  --color: red;
  color: var(--color);
}

However it is currently not supported in this plugin. Any reason? Could you support it? This would be awesome for conditional styling, e.g. notices with states like .error, .warning, etc.

MoOx commented 8 years ago

Please read the README.

lukasoppermann commented 8 years ago

Sorry, I did, but somehow did not really think about it enough, as the example above would not pose a problem, but when you use the .error classes, of course it would.

minimit commented 5 years ago

Relevant thread: postcss/postcss-custom-properties#1