postcss-grouper

PostCSS plugin that groups selectors together.

Usage no npm install needed!

<script type="module">
  import postcssGrouper from 'https://cdn.skypack.dev/postcss-grouper';
</script>

README

PostCSS Grouper

NPM version Travis Codecov

A plugin that'll group selectors you want together. My effort to have sexier css on the web.

Install

npm i postcss-grouper -D

Usage

var postcssGrouper = require('postcss-grouper');
postcss([
    postcssGrouper({
        group: [/html/]
    })
]);
Before After
html { color: black; }
.foo { color: white; }
html { margin-top: 10px; }
html { color: black; }
html { margin-top: 10px; }
.foo { color: white; }