pub struct Reset(/* private fields */);Expand description
A set of Chrome a primitive opts into giving back.
Implementations§
Source§impl Reset
impl Reset
Sourcepub const NOTHING: Self
pub const NOTHING: Self
Withdraw nothing. The starting point for Reset::and, and what a
primitive that is happy with its element gets by saying nothing.
Sourcepub const BULLETS: Self
pub const BULLETS: Self
The triple a <ul> or <ol> brings: the bullet, the gutter that made
room for it, and the indent. A described list of SSH keys is not a
bulleted list, and it rendered as one because nothing said otherwise.
Sourcepub const FLAT_BUTTON: Self
pub const FLAT_BUTTON: Self
A <button>’s raised look and nothing else: fill, stroke, shadow. What
stays is the hit area and the type, so the control is still worth
aiming at and still reads as a control.
This is the set that matters where an app hands makeover the cascade
with revert-layer: with an empty layer the handoff rolls past
makeover to a bare button rule, which supplies all three, and a
described flat control renders raised.
Sourcepub const TEXT_BUTTON: Self
pub const TEXT_BUTTON: Self
A <button> that has to stop looking like one, because the description
said link and only the method said button. Everything a control brings,
plus the pointing hand a link has and a button does not.
The shadow is deliberately absent, and it is the one asymmetry here:
this set is what .link has emitted since before the reset was named,
and widening it is a visible change rather than a refactor. A link
sitting inside an app whose bare button rule raises its buttons keeps
that shadow today.
Sourcepub const fn and(self, chrome: Chrome) -> Self
pub const fn and(self, chrome: Chrome) -> Self
Add one thing to the set. Const, so a named set above is a constant and not a function call at every emit.
Sourcepub const fn is_empty(self) -> bool
pub const fn is_empty(self) -> bool
Whether the set withdraws nothing, in which case a caller emits no rule
at all rather than an empty one. Same contract as
depth_declarations and
depth_rule.
Sourcepub fn declarations(self) -> String
pub fn declarations(self) -> String
The declarations, indented and terminated, ready for a rule body.
Sourcepub fn rule(self, selector: &str) -> String
pub fn rule(self, selector: &str) -> String
One rule, or nothing when the set withdraws nothing.
The selector is written in full and taken verbatim, which is where this
parts company with depth_rule: a reset exists
because of the element underneath, so its selector is routinely
element-qualified: button.link and not .link.