thomassittig / postcss-split-up-by-rules

Split css rules apart by selectors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

postcss-split-up-by-rules Build Status

PostCSS plugin Split up and filter a ruleset.

.themed .selector .for .any .element {
    margin: 0;
    color: #ffffff;
}
.for .any .element {
    margin: 0;
}

.themed .selector .for .any .element {
    color: #ffffff;
}

Usage

    module.exports = {
      plugins: {
        'postcss-split-up-by-rules': { 
            listenFor: ['.themed .selector'], 
            extract: ['color', 'background-color'] 
         },
      },
    };

See PostCSS docs for examples for your environment.

About

Split css rules apart by selectors

License:MIT License


Languages

Language:JavaScript 100.0%