0.1.1 • Published 4 years ago

@rock-kit/postcss-themeable-styles v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

category: packages

postcss-themeable-styles

npm  build-status  MIT License  Code of Conduct

For use with @rock-kit/babel-plugin-themeable-styles, converts CSS variables into ES template tokens:

Given:

/* style.css */
.root {
  background: var(--background);
  color: var(--color);

  &:hover {
    background: var(--hoverBackground);
    color: var(--hoverColor);
  }
}

Output:

/* style.css */
.root {
  background: ${theme.background};
  color: ${theme.color};

  &:hover {
    background: ${theme.hoverBackground};
    color: ${theme.hoverColor};
  }
}

Installation

yarn add --dev @rock-kit/postcss-themeable-styles

Usage

postcss([ require('@rock-kit/postcss-themeable-styles') ])
0.1.1

4 years ago

0.1.0

4 years ago