@davidwells/config-postcss

0.1.6 • Public • Published

Reusable PostCSS config

  • variables - Return static single property value
  • functions - Return dynamic single property values
  • mixins - Return multiple props/values and can be selectors as well

CSS nesting

.foo {
  color: red;
  @nest & > .bar {
    color: blue;
  }
}
/* equivalent to
   .foo { color: red; }
   .foo > .bar { color: blue; }
 */

.foo {
  color: red;
  @nest .parent & {
    color: blue;
  }
}
/* equivalent to
   .foo { color: red; }
   .parent .foo { color: blue; }
 */

.foo {
  color: red;
  @nest :not(&) {
    color: blue;
  }
}
/* equivalent to
  .foo { color: red; }
  :not(.foo) { color: blue; }
*/

Readme

Keywords

none

Package Sidebar

Install

npm i @davidwells/config-postcss

Weekly Downloads

0

Version

0.1.6

License

MIT

Unpacked Size

57.3 kB

Total Files

12

Last publish

Collaborators

  • davidwells