postcss-global-theme

1.1.0 • Public • Published

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.

Package Sidebar

Install

npm i postcss-global-theme

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • quoine-front-end
  • jeredmasters