#[non_exhaustive]pub enum Measure {
Wide,
Contained,
Reading,
}Expand description
How wide the content of a whole screen runs.
Both are the description’s, which is what answering the two together settled.
Measured in the MNW server, where 69 of 72 templates carry exactly one of
three mutually exclusive classes and the choice is per screen. GoingsOn
reaches for max-width 56 times and Balanced Breakfast 12, neither with a
token for it, so three apps were solving one thing by hand.
§Named for the measure, not for MNW’s classes
A renderer that is not a browser has to answer this too, and padded-page
tells a terminal nothing. The three say how wide the text runs, which is a
question every renderer can answer: a webview with a max-width, a terminal
with gutters, an immediate-mode frame with its own width.
#[non_exhaustive] for Fill’s reason. The set is closed today because
the measurement found three, and a fourth arriving should not be a lockstep
release across nine repos.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Wide
The whole width, with gutters. The default.
What a dashboard, a table and a settings screen want: the content is wide because the content is wide, and constraining it would waste the window.
Contained
Capped at a comfortable page width, centred.
A form, a sign-in, a purchase. Content that does not get better by getting wider, but is not prose either.
How wide is the consumer’s answer, not this enum’s, and a consumer
that gives no answer gets a cap too wide to do much. quasi-webview reads
--measure-contained and falls back to 87.5rem, which is 1400px: at any
ordinary window that is indistinguishable from Wide. MNW sets 56rem
and gets the shape this variant describes. So declaring Contained and
setting no token is a screen that asked to be narrowed and was not,
which is worth knowing before reading a wide-looking form as a renderer
bug.
Reading
Capped at a line length that reads well.
Prose. The narrowest of the three, and the one with a reason outside taste: a line of text past roughly 75 characters costs the reader the return sweep.