Bonfire.UI.Common.ThemeHelper (Bonfire v0.9.12-social-beta.71)
View SourceHelper functions to handle theme selection and application. Uses the new OKLCH color format and updated CSS variable naming scheme.
Summary
Functions
Determines the current theme based on user preferences and context. Handles special cases including
Functions
Determines the current theme based on user preferences and context. Handles special cases including:
- Light/dark preference
- System preference (follows device settings)
- Custom theme (which uses inline styles applied via layout_live.ex)
Returns a theme name string that is set on data-theme attribute in the DOM.