Expand description
Build-script support: the generated files every webview consumer
materialises from its build.rs, and the checks that keep its hand-written
frontend agreeing with them.
Behind the build feature, so a runtime consumer of the renderer does not
link makeover’s theme set. A consumer takes this crate twice: as a
dependency for the markup and as a build-dependency with features = ["build"] for these files. links holds both to one version.
Every consumer materialises the same generated files from a build.rs.
This is that code, once.
§Density
geometry_css keys the touch preset on capability: touch hangs off “not
a fine, hovering pointer” and never off a user-agent string or a
breakpoint. An app with a manual override passes the selector it sets to
explicit_touch.
§Why these files are generated rather than checked in
Tauri’s resource globs are read by its CLI against the crate directory, so
they cannot point into a registry checkout or OUT_DIR. Materialising into
the crate keeps the source crate authoritative without vendoring a second
copy that drifts. Every path written here is expected to be gitignored.
§The other half: what is checked rather than written
A consumer’s frontend is not all generated. The stylesheet and the scripts
are hand-written and state some of the same facts the generated files ask
the crates for, so they can drift where a generated file cannot. drift
holds the checks that keep them honest, and they are assertions rather than
substitutions on purpose: a file that has to be generated to be correct
stops being readable on its own.
Re-exports§
pub use drift::Allow;pub use drift::Breakpoints;pub use drift::Vocabulary;pub use drift::check_touch_density;pub use drift::check_vocabulary_use;
Modules§
- drift
- Checks that a hand-written frontend still agrees with the crate that generates its siblings.
Structs§
- Font
Face - Layer 0 of the font model, re-exported for the same one-dependency reason.
- Font
Override - Layer 0 of the font model, re-exported for the same one-dependency reason.
- Typography
- Layer 0 of the font model, re-exported for the same one-dependency reason.
Enums§
- Font
Slot - Layer 0 of the font model, re-exported for the same one-dependency reason.
Constants§
- WEBFONT_
MONO_ FILE - The filenames
typography_css’s@font-facerules fetch. - WEBFONT_
SANS_ FILE - The filenames
typography_css’s@font-facerules fetch.
Functions§
- geometry_
css - Write
makeover-geometry’s spacing layer, with its canonical density selection, topath. - layout_
css - Write
makeover-webview’s component stylesheet topath. - tauri_
frontend - All the generated files at the layout every Tauri consumer already uses:
themes/beside the manifest, andfrontend/css/{geometry,timing,layout,typography}.cssunder it. - tauri_
frontend_ with tauri_frontend, for a product that overrides a font slot.- themes
- Write the themes
makeoverships intodir, as<id>.toml. - timing_
css - Write
makeover-timing’s time axis, and the motion-off block that rides with it, topath. - typography_
css - Write the house typography layer to
path: the two@font-facerules and the two tokens they back. - typography_
css_ from typography_css, for a product that overrides a slot.