Protected
_dependantsProtected
_lastProtected
_listenersProtected
readyProtected
_addProtected
_generateOptional
remove?: booleanProtected
_notifyProtected
notifyWrite theme variables to get autocomplete while developing. Only works from node.
// src/bin/generateThemeVars.ts
import { theme } from "../theme.js" // import theme instance
// write relative to file
theme.write(import.meta.url, "../assets/variables.scss")
In package.json:
"scripts": {
"gen:theme": "pnpm ts-node src/bin/generateThemeVars.ts"
}
Static
setSet css variables on an element.
Careful that the css properties are prefixed with --
, otherwise they might conflict with other style properties.
Can be passed a list of already set properties to remove. Returns a list of properties that were set.
Generated using TypeDoc
Creates a theme class for grouping variables and applying them to elements.