Skip to main content

Module build

Module build 

Source
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. 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.

§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.

§Where the files land

Every emitter writes into the consumer’s own crate directory, at the path it is given. The consumer gitignores every path written here.

§What is checked rather than written

drift holds the checks over the consumer’s hand-written stylesheet and scripts. They assert and panic; none of them rewrites a file.

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 crates that generate its siblings.

Structs§

FontFace
Layer 0 of the font model, re-exported for a build script composing an override. One @font-face an override brings with it.
FontOverride
Layer 0 of the font model, re-exported for a build script composing an override. One product’s answer for one slot: the stack, and any faces it ships.
Typography
Layer 0 of the font model, re-exported for a build script composing an override. The whole typography layer for one product: the house defaults, plus whatever it overrides.

Enums§

FontSlot
Layer 0 of the font model, re-exported for a build script composing an override. A slot in the house font vocabulary: the unit an override replaces.

Constants§

WEBFONT_MONO_FILE
The filenames typography_css’s @font-face rules fetch. A consumer’s build script writes its font files under these names. Filename a consumer writes the cut mono face to, under its own font URL.
WEBFONT_SANS_FILE
The filenames typography_css’s @font-face rules fetch. A consumer’s build script writes its font files under these names. Filename a consumer writes the cut body face to. See WEBFONT_MONO_FILE.

Functions§

geometry_css
Write makeover-geometry’s spacing layer, with its canonical density selection, to path.
layout_css
Write makeover-webview’s component stylesheet, crate::stylesheet for opts, to path.
tauri_frontend
All the generated files at the Tauri layout: themes/ beside the manifest, and frontend/css/{geometry,timing,layout,typography}.css under it.
tauri_frontend_with
tauri_frontend, for a product that overrides a font slot.
themes
Write the themes makeover ships into dir, as <id>.toml.
timing_css
Write makeover-timing’s time axis, and the motion-off block that rides with it, to path.
typography_css
Write the house typography layer to path: the two @font-face rules and the two tokens they back.
typography_css_from
typography_css, for a product that overrides a slot.