postcss / postcss-simple-vars

PostCSS plugin for Sass-like variables
MIT License
415 stars 36 forks source link

Question. How to use constants in css? #43

Closed NXTaar closed 8 years ago

NXTaar commented 8 years ago

my constants.js file which i pass to the variables option

module.exports = {
    colors: {
        main:  "#562d91",
        side: "#d11774"
    }
    sizes: {
       general: '40px'
    }
};

what should i write in css to get this variables?

ai commented 8 years ago

Sorry, this plugin is for simple variables :). There are many other plugins with more complicated syntax and objects support:

https://github.com/postcss/postcss/blob/master/docs/plugins.md#language-extensions