#[non_exhaustive]pub struct Emit {
pub border_width: &'static str,
pub focus_width: &'static str,
pub target_min: &'static str,
pub class_prefix: &'static str,
pub required_marker: &'static str,
pub exclude_label: &'static str,
pub write_label: &'static str,
pub preview_label: &'static str,
pub lower_label: &'static str,
pub upper_label: &'static str,
}Expand description
How the emitted CSS and markup are shaped, and the copy they carry.
Built with Emit::new and its setters. #[non_exhaustive], so a new
knob is not a breaking change for anyone who configures one.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.border_width: &'static strBevel thickness, as a CSS length.
A value, so it arrives from the caller: this crate names no sizes of its own.
focus_width: &'static strFocus ring thickness, as a CSS length.
Separate from border_width, and never derived
from it: a bevel and a focus indicator answer different questions, and
only one of them has to be noticed from across a desk.
The default, 2px, is what every consumer had chosen for its own ring.
target_min: &'static strThe smallest a pointer target may be drawn, as a CSS length.
A value for border_width’s reason: a floor is a
size, and this crate names no sizes of its own.
The default is WCAG 2.2’s target minimum. It is an absolute rather than a step off the geometry base, and that is deliberate on two counts: a floor that scales with the reader’s root size is not a floor, and the touch density opens the gaps between targets rather than licensing a smaller one for a pointer.
class_prefix: &'static strPrefix for emitted class names, without the leading dot.
required_marker: &'static strWhat marks a compulsory field, appended to its label.
makeover-tui’s PieceStyle::required_marker and
makeover-immediate’s FieldStyle::required_marker, said here for the
third renderer, with their default. A knob for their reason: it is the
one piece of copy this crate emits, and copy is not a renderer’s
call.
§Why it is hidden from the accessibility tree here and nowhere else
The control already carries required, which a screen reader
announces. A marker read out beside it is the same fact twice, so the
span is aria-hidden. The other two renderers have no such attribute
to lean on, which is why the marker is part of the label string there
and an element here.
exclude_label: &'static strThe accessible name’s lead on a facet value’s exclude button, before
the value’s own label: “Exclude Drums”. Copy, for
required_marker’s reason.
write_label: &'static strThe markdown editor’s two modes, as the segments say them.
preview_label: &'static strSee write_label.
lower_label: &'static strThe accessible names of an interval’s two boxes.
upper_label: &'static strSee lower_label.
Implementations§
Source§impl Emit
impl Emit
Sourcepub const fn border_width(self, value: &'static str) -> Self
pub const fn border_width(self, value: &'static str) -> Self
Set border_width.
Sourcepub const fn focus_width(self, value: &'static str) -> Self
pub const fn focus_width(self, value: &'static str) -> Self
Set focus_width.
Sourcepub const fn target_min(self, value: &'static str) -> Self
pub const fn target_min(self, value: &'static str) -> Self
Set target_min.
Sourcepub const fn class_prefix(self, value: &'static str) -> Self
pub const fn class_prefix(self, value: &'static str) -> Self
Set class_prefix.
Sourcepub const fn required_marker(self, value: &'static str) -> Self
pub const fn required_marker(self, value: &'static str) -> Self
Set required_marker.
Sourcepub const fn exclude_label(self, value: &'static str) -> Self
pub const fn exclude_label(self, value: &'static str) -> Self
Set exclude_label.
Sourcepub const fn write_label(self, value: &'static str) -> Self
pub const fn write_label(self, value: &'static str) -> Self
Set write_label.
Sourcepub const fn preview_label(self, value: &'static str) -> Self
pub const fn preview_label(self, value: &'static str) -> Self
Set preview_label.
Sourcepub const fn lower_label(self, value: &'static str) -> Self
pub const fn lower_label(self, value: &'static str) -> Self
Set lower_label.
Sourcepub const fn upper_label(self, value: &'static str) -> Self
pub const fn upper_label(self, value: &'static str) -> Self
Set upper_label.