Skip to content

PostCss plugin which provides SAAS like markup, color-mod function, custom @import resolvers and theme support

License

Notifications You must be signed in to change notification settings

bstefanescu/postcss-qute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postcss-qute

PostCss plugin which provides SAAS like markup, color-mod function, custom @import resolvers and theme support

Build Status

Plugins

This plugin is powered by the following plugins (in this order):

Theme Support

The plugin also provides a way to define themes, by replacing the default @import resolver of the postcss-advanced-variables plugin with a custom resolver implementation which uses the npm resolve resolver to resolve imported files.

Theme files should be placed inside a themes/{themeName} folder in the root of the project. The default theme name is default and will be used if no other theme is explicitly set.

In your CSS files where you want to import the current theme you should write:

@import "%theme"

This will import the index.css file located in the current theme directory: themes/{themeName}/index.css

To import other files from the theme directory, you should specify the path to the file:

@import "%theme/variables.css"

This will import the file themes/{themeName}/variables.css

To change the default theme (which name is default) you should pass the theme option to the postcss-qute plugin:

import postcss from `postcss`;
import quteCss from `postcss-qute`;

postcss([
    quteCss({
      theme: 'redish'
    })
])

The options object passed to postcss-qute will be passed to each nested plugin.

License

MIT

About

PostCss plugin which provides SAAS like markup, color-mod function, custom @import resolvers and theme support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published