1.1.0 • Published 7 years ago

postcss-global-theme v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

PostCSS Global Theme Build Status

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.