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§
- Font
Face - Layer 0 of the font model, re-exported for a build script composing an
override.
One
@font-facean override brings with it. - Font
Override - 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§
- Font
Slot - 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-facerules 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-facerules fetch. A consumer’s build script writes its font files under these names. Filename a consumer writes the cut body face to. SeeWEBFONT_MONO_FILE.
Functions§
- geometry_
css - Write
makeover-geometry’s spacing layer, with its canonical density selection, topath. - layout_
css - Write
makeover-webview’s component stylesheet,crate::stylesheetforopts, topath. - tauri_
frontend - All the generated files at the Tauri layout:
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.