Skip to main content

gap_css_overrides

Function gap_css_overrides 

Source
pub fn gap_css_overrides(selector: &str, density: Density) -> String
Expand description

Emit a density preset as a scoped override block.

Only the relational layer is emitted: the scale and the base do not change between presets, so an app ships geometry_css_vars at its default density and one of these per mode class it supports.

let css = gap_css_overrides(".ui-mode-mobile", Density::Touch);
assert!(css.starts_with(".ui-mode-mobile {\n"));