themescura package
Functions
|
Function |
Description |
|---|---|
|
Input a nested object and prefix Returns a new object with the keys replaced with css variables made from the prefix and the keys | |
|
Final css should be :root { // Base vars } (prefers-color-scheme: dark) { :root { // Dark mode vars } } (prefers-color-scheme: light) { :root { // Light mode vars } } .dark-mode { // This is added to the body tag } .light-mode { // This is added to the body tag } The class is selected last to override preference when it is set specifically by user | |
|
Flatten a nested object to a flat object, The keys are replaced and joined with the newKey function that gives a key starting with — and joined with - | |
|
Generate a theme from a palette | |
Interfaces
|
Interface |
Description |
|---|---|
Variables
|
Variable |
Description |
|---|---|
Type Aliases
|
Type Alias |
Description |
|---|---|