Sass Theme manager
This tiny sass helper offers a convenient way to manage your styleguide and themes using sass maps.
Installation
npm install sass-theme-manager --save-dev
Then include the index.scss file from the package.
Usage
Themes can be set per component basis, and globally for styleguide theme management.
Locally
.my-component
Globally
font-family: 'Roboto')); html, body .my-component h1
Set theme styles
To set a theme for a component, include theme
mixin inside the component root. The component theme name is binded from the parent selector. Nested styles are supported.
my-component
Get theme styles
To get a style from the theme use the theme
function. The theme name is implicitly binded from the scope, or explicitly set as a first parameter. Nested styles are supported.
my-component
Global themes
To set global themes, include theme
mixin in the global scope.
h1