Skip to main content

depth_rules

Function depth_rules 

Source
pub fn depth_rules(opts: &Emit) -> String
Expand description

One rule per depth: its fill and its edge, together.

A depth and nothing else. .raised says a surface sits on what is behind it, which is a statement about the shape and not about what happens when a pointer arrives, so it emits no hover, press, focus or disabled rule. The named surfaces are where interaction lives: .card and .button are the same depth and controls, and they get their states from [surface_rules].

Giving this class the interactive set leaves the vocabulary with no raised surface that is merely an object, so a consumer that needs one has to take a control class and cancel half of it.