uncover-co/elm-theme-spec/6.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.

theme : ThemeSpec -> Theme
themeSpec : ThemeSpecData -> ThemeSpec
type alias ThemeSpecData =
{ fonts :
{ title : String
, text : String
, code : String
}
, colors :
{ background : ThemeSpecBackground
, details : ThemeSpecBackground
, base : ThemeSpecColor
, accent : ThemeSpecColor
, success : ThemeSpecColor
, warning : ThemeSpecColor
, danger : ThemeSpecColor
}
}
type alias ThemeSpecBackground =
{ default : Color
, dark : Color
, darker : Color
, shadow : Color
}
type alias ThemeSpecColor =
{ default : Color
, light : Color
, lighter : Color
, inverse : Color
}

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)

background : ThemeSpecBackgroundVariableSet
details : ThemeSpecBackgroundVariableSet
base : ThemeSpecColorVariableSet
accent : ThemeSpecColorVariableSet
success : ThemeSpecColorVariableSet
warning : ThemeSpecColorVariableSet
danger : ThemeSpecColorVariableSet
{ default : String
, defaultChannels : String
, dark : String
, darkChannels : String
, darker : String
, darkerChannels : String
, shadow : String
, shadowChannels : String
}
{ default : String
, defaultChannels : String
, light : String
, lightChannels : String
, lighter : String
, lighterChannels : String
, inverse : String
, inverseChannels : String
}