module Opal::UI::Themable

Overview

Module mixed into Elements and Controls allowing per-instance theme binding, dynamic theme fallback, and fluent styling blocks.

Direct including types

Defined in:

opal/ui/themable.cr

Instance Method Summary

Instance Method Detail

def current_theme : Theme #

Returns the effective theme: either this component's local theme or global Theme.current


[View source]
def style(&block : self -> Nil) : self #

Yields self to a block for fluent styling/theme value manipulation


[View source]
def theme : Theme | Nil #

Optional local theme override for this component instance


[View source]
def theme=(theme : Theme | Nil) #

Optional local theme override for this component instance


[View source]
def with_theme(new_theme : Theme | Symbol | String) : self #

Assigns a local theme to this component


[View source]