0.1.1 • Published 4 years ago
@rock-kit/postcss-themeable-styles v0.1.1
category: packages
postcss-themeable-styles
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') ])