uncover-co/elm-theme-spec/4.0.0

NOTE: the latest version is 8.0.1

ThemeSpec

ThemeSpec is a theme specification that can be used across a variety of projects to quickly theme them based on CSS variables. 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.

type alias ThemeSpec =
{ fontTitle : String
, fontText : String
, fontCode : String
, borderRadius : String
, borderRadiusLarge : String
, focus : String
, background : ThemeSpecBackground
, base : ThemeSpecColor
, accent : ThemeSpecColor
, success : ThemeSpecColor
, warning : ThemeSpecColor
, danger : ThemeSpecColor
}
type alias ThemeSpecBackground =
{ base : String
, dark : String
, darker : String
, shadow : String
}
type alias ThemeSpecColor =
{ base : String
, light : String
, lighter : String
, shadow : String
}
theme : ThemeSpec -> Theme

Used for turning a ThemeSpec into a Theme used by elm-theme-provider.

Default Themes

lightTheme : Theme
darkTheme : Theme

Theme Sample

sample : Html msg

Renders an element that showcases all the current theme's colors and settings.

Theme Variables

fontTitle : String

var(--tmspc-font-title)

fontText : String

var(--tmspc-font-text)

fontCode : String

var(--tmspc-font-code)

borderRadius : String

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)

focus : String

var(--tmspc-focus)

Usually used for accessibility purposes.

background : String

var(--tmspc-background)

var(--tmspc-background-dark)

var(--tmspc-background-darker)

var(--tmspc-background-shadow)

base : String

var(--tmspc-base)

baseLight : String

var(--tmspc-base-light)

baseLighter : String

var(--tmspc-base-lighter)

baseShadow : String

var(--tmspc-base-shadow)

danger : String

var(--tmspc-danger)

dangerLight : String

var(--tmspc-danger-light)

dangerLighter : String

var(--tmspc-danger-lighter)

dangerShadow : String

var(--tmspc-danger-shadow)

accent : String

var(--tmspc-accent)

accentLight : String

var(--tmspc-accent-light)

accentLighter : String

var(--tmspc-accent-lighter)

accentShadow : String

var(--tmspc-accent-shadow)

success : String

var(--tmspc-success)

successLight : String

var(--tmspc-success-light)

var(--tmspc-success-lighter)

successShadow : String

var(--tmspc-success-shadow)

warning : String

var(--tmspc-warning)

warningLight : String

var(--tmspc-warning-light)

var(--tmspc-warning-lighter)

warningShadow : String

var(--tmspc-warning-shadow)