StylusVars
Converts javascript variables to stylus variables; allows to use one configuration file for your sizes and colors in both javascript and stylus. Accepts nested variables, and automatically parses units and colors.
Usage
var config = sizes: width:"500px" height:"200px" background:"rgba(10,10,100)" color:10010105//this array will be parsed as a color because the key contains "background" or "color" someArray:100002var str = ; var stylus = ; var stylusVars = configdelimiter:'-';// the delimiter option defines how nested objects will be represented ;
//style.styldiv width sizes-width + 50 height sizes-height background background color color
yields: