postcss-theme-colors
Theming with cc()
.
Installation
npm install postcss-theme-colors postcss-nested # or if you are using postcss-nesting# npm install postcss-theme-colors postcss-nesting # or postcss-preset-env# npm install postcss-theme-colors postcss-preset-env
Usage
Input:
Output:
Configuration
const colors = C01: '#eee' C02: '#111' const groups = G01: 'C01' 'C02'
Plugin Options
options: Object
colors: Object
, color definitions.groups: Object
, group definitions.function: string
, function name, defaults tocc
.useCustomProperties: boolean
, whether to transformcc(group)
tovar(color)
, defaults tofalse
.darkThemeSelector: string
, dark theme selector, defaults tohtml[data-theme="dark"]
.nestingPlugin: string | null
, specific the nesting plugin ('nested'
or'nesting'
), will detect automatically by default.