Skip to main content

Module theme

Module theme 

Source
Expand description

What a directory listing looks like.

The palettes are base16 schemes, vendored under crates/ssh-browser/themes/. souta asked whether there was a standard for this rather than a hand-rolled set, and there is: base16 is a spec with several hundred schemes behind it, every one of them sixteen hex values and a name. This module is an implementation of that format.

Which also settles the objection to the palettes it replaces. Inventing five of my own meant five things nobody else had opinions about; naming them after somebody’s editor theme would have been a promise to keep matching a moving target in another repository. Implementing a format is neither.

Every rule in the listing’s stylesheet is written against the custom properties built here, so adding a scheme is dropping a file in — not a second copy of the layout.

Structs§

Theme

Constants§

DEFAULT
The theme used when nothing says otherwise.

Functions§

all
check
Refuse a name that is not one of these, and say what the choices are.
css_for
The :root block for a theme, including the system-following pair when it follows.
exists
remember
Remember a theme, and say where it went.
remembered
The remembered theme, if there is one and it still exists.