Styling
The Tui styling system controls how widgets look and how they are laid out. It draws heavily from CSS concepts: styles are immutable value objects, stylesheets map selectors to styles and a cascade determines which rules win when multiple selectors match.
There are three ways to style a widget:
- Inline style: call
setStyle()on a widget instance. This has the highest priority and overrides everything else (see Style). - Stylesheet rules: add CSS-like rules that match widgets by class name, FQCN, state or sub-element (see Stylesheets).
- Utility classes: add Tailwind-like class names to widgets for quick, composable styling without writing stylesheet rules (see Tailwind Utility Classes).
This work, including the code samples, is licensed under a
Creative Commons BY-SA 3.0 license.