Home > @xypnox/themescura > cssConverter
cssConverter() function
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
Signature:
cssConverter: <M extends Record<string, any>, P extends Record<string, any>, T extends Theme<M, P>>(theme: T) => string
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
theme |
T |
string