postcss / postcss-simple-vars

PostCSS plugin for Sass-like variables
MIT License
419 stars 35 forks source link

Add support for scss variable default statement #30

Closed soilysound closed 9 years ago

soilysound commented 9 years ago

Scss can do this with variables -

$example: 'value' !default;

Whereby it will only set the value of $example if it doesn't already exist. This is an important function to allow cascading.

Could this be supported in postcss-simple-vars?

ai commented 9 years ago

I think this behaviour of cascading is bad design.

What task you want to solve?

soilysound commented 9 years ago

Components that have certain values that we want to override with values set in a skin file:

@import skin-for-red-website.css > sets $background:red @import component.css > sets $background:grey !default

ai commented 9 years ago

https://github.com/postcss/postcss-simple-vars/issues/25#issuecomment-140525465