ThemeSpec is a theme specification that can be used across a variety of projects to quickly theme them based on CSS vars. Themes are scoped and multiple can be used at the same time in an application. ThemeSpec is fully compatible with darkmode and any theme can have dark variants.
Defines the dark mode strategy.
SystemStrategy uses the user system settings.ClassStrategy uses the presence of a CSS class to determine dark mode.Renders an element that showcases all the current theme's colors and settings.
var(--tmspc-font-title)
var(--tmspc-font-text)
var(--tmspc-font-code)
var(--tmspc-border-radius)
Usually used for the border radius of small elements. (e.g. buttons)
var(--tmspc-border-radius-large)
Usually used for the border radius of large elements. (e.g. cards)
var(--tmspc-focus)
Usually used for accessibility purposes.
var(--tmspc-color-base)
var(--tmspc-background-contrast)
var(--tmspc-background-dark)
var(--tmspc-background-light)
var(--tmspc-background-shadow)
var(--tmspc-background-tint)
var(--tmspc-color-base)
var(--tmspc-color-contrast)
var(--tmspc-color-dark)
var(--tmspc-color-light)
var(--tmspc-color-shadow)
var(--tmspc-color-tint)
var(--tmspc-danger-base)
var(--tmspc-danger-contrast)
var(--tmspc-danger-dark)
var(--tmspc-danger-light)
var(--tmspc-danger-shadow)
var(--tmspc-danger-tint)
var(--tmspc-highlight-base)
var(--tmspc-highlight-contrast)
var(--tmspc-highlight-dark)
var(--tmspc-highlight-light)
var(--tmspc-highlight-shadow)
var(--tmspc-highlight-tint)
var(--tmspc-success-base)
var(--tmspc-success-contrast)
var(--tmspc-success-dark)
var(--tmspc-success-light)
var(--tmspc-success-shadow)
var(--tmspc-success-tint)
var(--tmspc-warning-base)
var(--tmspc-warning-contrast)
var(--tmspc-warning-dark)
var(--tmspc-warning-light)
var(--tmspc-warning-shadow)
var(--tmspc-warning-tint)
Use this if you want to create your own custom providers. This should only be useful for theme-spec interop library authors.