TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
CSS and theming

A theme decides how every control looks: its colors, borders, spacing and fonts. In TachyonUI a theme is a set of CSS files:

  • They use a subset of the CSS that web browsers read.
  • They add properties of their own, whose names start with -tachyon-.
  • Each class in them becomes a tachyon::Style, the object a control is drawn with.

A class is a named rule, such as .link below. A control asks for its style by that name. From themes/styles.css:

.link { color: var(--text-link); cursor: pointer; }
.link:hover { color: var(--text-link-hover); }
Page Covers
How a theme loads Theme files, load order, palettes, reloads
Syntax Rules, selectors, states, comments, @font-face, custom properties
Values Numbers, units, colors, gradients
Properties Every supported property, and what isn't supported
Using styles from C++ Theme classes, styles built in code, UI scale