@temporg/postcss-themeable-styles

99.10.0 • Public • Published

category: packages

postcss-themeable-styles

npm  build-status  MIT License  Code of Conduct

For use with @temporg/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 @temporg/postcss-themeable-styles

Usage

postcss([ require('@temporg/postcss-themeable-styles') ])

Readme

Keywords

none

Package Sidebar

Install

npm i @temporg/postcss-themeable-styles

Weekly Downloads

33

Version

99.10.0

License

MIT

Unpacked Size

3.25 kB

Total Files

3

Last publish

Collaborators

  • npm