0.7.0 • Published 5 years ago

sui_themer v0.7.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Themer usage

Themer is a simple storage of selected, default + list of all available themes + changer function.

Usage case: themes.scss file MUST be present in the _visible scss directory

themes.scss file format:

:global(html) {
  --bg1: #{$bgColor};
  --color1: #{$color};
}
:global(html[data-theme="dark"]) {
  --bg1: #{$secondaryColorLight};
  --color1:#{$colorPrim};
}
:global(html[data-theme="pastel"]) {
  --bg1: #{$primaryColorDark};
  --color1:#{$grayColorLight};
}

The 1st theme is default one and has no data-theme

App.svelte

import {ThemeChanger} from sui_themer;
0.7.0

5 years ago