Use Sass To Generate Customizable CSS

To create a customaizable property you have to use the controll mixin. See the output at the upper right corner to try it.

Basic Example

.example-1{
    @include controll('.example-1'){ 
      @include property('width', 50px, (min: 0, max: 500));
      @include property('background-color', #f00); 
    }
}

Using A List Of Possible Values

.example-2{
    @include controll('.example-2'){ 
       @include property('width', 50px, (min: 0, max: 500)); 
       @include property('background-color', (blue, green, yellow));
    }
}

Why?

Maybe this can be usefull for a style guide or prototyping.

How?

Using SassyJSON in combination with dat.GUI .

Future

In future version of Sass (>=3.4) it will be possible to omitt the controll mixin to have a cleaner syntax for this.