README
PostCSS Global Theme
PostCSS plugin to support theming using global class.
/* Input example */
@theme {
.text {
border: solid $accent 1px;
}
}
/* Output example */
.text {
border: solid $accent 1px;
}
:global(.dark) .text {
border: solid $dark-accent 1px;
}
:global(.light) .text {
border: solid $light-accent 1px;
}
Usage
postcss([
require('postcss-global-theme')({
theme: ['dark', 'light']
})
])
See PostCSS docs for examples for your environment.