postcss-composes-shorthand

PostCSS plugin to add shorthand for composing classes from modules

Usage no npm install needed!

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

README

PostCSS Composes Shorthand Build Status

PostCSS plugin adds shorthand for composing classes from modules. Works in conjunction with css-modules.

Usage

postcss([ require('postcss-composes-shorthand')(['bar', {shorthand: 'hi', name: 'hello'}]) ])
Input CSS
.foo {
  bar: a b c;
  hi: y z;
}
Output CSS
.foo {
  composes: a b c from "bar";
  composes: y z from "hello";
}

See PostCSS docs for examples for your environment.