postcss-global-theme
1.1.0 • Public • Published PostCSS Global Theme
PostCSS plugin to support theming using global class.
@theme {
.text {
border: solid $accent 1px;
}
}
.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.
Package Sidebar
Install
npm i postcss-global-theme
Weekly Downloads