Expand description
The webview renderer for makeover_layout.
§The renderer that needs no palette
makeover-immediate and makeover-tui both take a Palette, because egui
and a terminal need an actual colour before they can put anything on
screen. A webview does not: var(--surface-raised) is the late binding,
and the browser resolves it against whatever themes.js last wrote onto
:root.
So this crate emits text naming intents, and never learns a colour. It is the deferral rule with no adapter in the way, and it is why the webview was always the wrong renderer to derive a vocabulary from: it can express anything, so it never pushes back.
§Phase A: the stylesheet only
This emits component CSS and no markup, deliberately. GoingsOn has 145
innerHTML sites and Balanced Breakfast 175 createElement sites; moving
markup is a migration, while adopting a generated stylesheet is a deletion.
The apps keep every line of their markup and gain the classes.
The output is byte-identical to the bevel composition both apps already hand-write, which is asserted below, so adoption removes duplicated lines rather than changing a pixel.
§Substitution, three ways
Fill::Well has no colour on makeover before 2.3.0, and each renderer
answers that differently, which is the evidence that dropping
Fill::fallback from the description was right:
makeover-immediatesubstitutes the page in Rust.makeover-tuirefuses to substitute and draws an edge instead, because a terminal would quantise the two together.- here, CSS already has the mechanism:
var(--surface-well, var(--surface-page))falls back in the browser, and nothing in Rust decides anything.
Structs§
- Emit
- How the emitted CSS is shaped.
Functions§
- bevel_
properties - The custom properties both bevels resolve through.
- bevel_
shadow - The two-tone edge as a
box-shadowvalue. - bevel_
var - The CSS custom property holding a bevel’s composition.
- depth_
class - The class name for a depth.
- depth_
rules - One rule per depth: its fill and its edge, together.
- fill_
var - A
var()reference to a fill intent, with the browser’s own fallback where the intent may be absent. - stylesheet
- The whole phase-A stylesheet: properties and rules, with a generated-file banner.