Skip to main content

Module spec

Module spec 

Source
Expand description

Border and shadow specifications, plus elevation → shadow presets.

The single-edge BorderSpec is paired with BorderSpecs for per-side borders (top/right/bottom/left). Shadows come in two flavours: a single representative ShadowSpec via elevation_shadow, and the full ambient + key pair stack via elevation_shadows following Material Design’s two-layer elevation model.

Structs§

BorderSpec
A border specification: width, style, and colour.
BorderSpecs
Per-side border specification: each edge of a rectangle may carry its own BorderSpec. Use BorderSpecs::uniform when all four edges agree.
ShadowSpec
A box-shadow specification.

Enums§

BorderStyle
Border line style.

Functions§

elevation_shadow
Returns the conventional drop-shadow stack for elevation level (0..=5).
elevation_shadows
Returns a Material Design-style ambient + key two-shadow stack for the given elevation (logical dp, typical range 0–24).
elevation_to_shadow
Convert a continuous elevation value (in logical dp, typical range 0–24) to a single representative ShadowSpec.