Skip to main content

max / makeover-build

Emit the compact-shell override, not only the density block makeover-geometry 0.7.0 put shell tightening on the size-class axis and shipped size_class_css() to spell it. Nothing called it. geometry_css emitted density_css alone, so the axis existed in the crate and reached no stylesheet in any of the three consumers: goingson's generated geometry.css had no width query in it at all. Both axes now land, density first and width second, because width is the narrower claim: on a compact window the two shells tighten regardless of which density selected them. The round-trip test asserts the compact block carries --gap-pane and no control gap, which is the mistake the emitter exists to prevent. The crate header still said the geometry emitter was deliberately absent because the consumers disagreed on density selection. They stopped disagreeing when that was settled and the emitter landed after it, so the section now records how it went rather than a state that ended.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-10 22:15 UTC
Signed with PGP, not checked
Commit: cf18c638cb293901e3af5d08f27c9c9e12df6740
Parent: 79b699f
1 file changed, +36 insertions, -10 deletions
M src/lib.rs +36 -10
@@ -8,17 +8,20 @@
8 8 //! makeover-geometry adoption, and the layout stylesheet would have been the
9 9 //! third and fourth copies. This is that code, once.
10 10 //!
11 - //! # What is deliberately not here
11 + //! # The geometry emitter, and why it took a decision to land
12 12 //!
13 - //! The geometry emitter. GoingsOn and Balanced Breakfast do *not* agree on it:
14 - //! GO scopes the touch preset to a `ui-mode-mobile` class set by a bootstrap
15 - //! script, BB hangs it off `@media (hover: none)`, and audiofiles has no
16 - //! switch at all. Extracting it would mean picking one of those policies by
17 - //! accident, inside a shared crate, without anyone deciding. Density selection
18 - //! is unowned and has its own task; the geometry half lands after it.
13 + //! [`geometry_css`] was deliberately absent at first. GoingsOn and Balanced
14 + //! Breakfast did not agree on it: GO scoped the touch preset to a
15 + //! `ui-mode-mobile` class set by a bootstrap script, BB hung it off
16 + //! `@media (hover: none)`, and audiofiles had no switch at all. Extracting it
17 + //! then would have meant picking one of those policies by accident, inside a
18 + //! shared crate, without anyone deciding.
19 19 //!
20 - //! Taking the identical half now and leaving the contested half alone is the
21 - //! whole point: a helper crate should record agreement, not manufacture it.
20 + //! Density selection was settled instead -- touch is a capability, so it hangs
21 + //! off `(hover: none), (pointer: coarse)` and never off a user-agent string or
22 + //! a breakpoint -- and the emitter followed. Recording an agreement rather than
23 + //! manufacturing one is the whole point, and it is why the order was that way
24 + //! round.
22 25 //!
23 26 //! # Why these files are generated rather than checked in
24 27 //!
@@ -86,6 +89,14 @@
86 89 /// when the user has chosen. See [`makeover_geometry::density_css`]. All this
87 90 /// adds is the generated-file banner and the write.
88 91 ///
92 + /// Both spacing axes land here, in the order the crate defines them.
93 + /// [`makeover_geometry::size_class_css`] follows the density block because it
94 + /// is the narrower claim: density says what is pointing at the screen, size
95 + /// class says how much screen there is, and on a compact window the two shells
96 + /// tighten regardless of which density selected them. Shipped in
97 + /// makeover-geometry 0.7.0 and emitted by nobody until 2026-08-10, which meant
98 + /// the axis existed in the crate and reached no stylesheet.
99 + ///
89 100 /// # Panics
90 101 ///
91 102 /// If the file cannot be written.
@@ -94,9 +105,12 @@
94 105 "/* Generated by makeover-build from makeover-geometry. Do not edit.\n \
95 106 Spacing is named by relationship, not by size. Touch density is a\n \
96 107 capability question: a narrow desktop window still has a pointer, a\n \
97 - full-width tablet still has a finger. */\n",
108 + full-width tablet still has a finger. Window width is the separate\n \
109 + question below it: on a compact window the two shells tighten. */\n",
98 110 );
99 111 css.push_str(&makeover_geometry::density_css(explicit_touch));
112 + css.push('\n');
113 + css.push_str(&makeover_geometry::size_class_css());
100 114 std::fs::write(path, css).expect("write geometry css");
101 115 }
102 116
@@ -190,6 +204,18 @@
190 204 assert!(css.starts_with("/* Generated by makeover-build"));
191 205 assert!(css.contains("@media (hover: none), (pointer: coarse)"));
192 206 assert!(css.contains(".ui-mode-mobile"));
207 + // The width axis rides along, and only the shells are in it: a gap
208 + // between two controls in a width query is the bug size_class_css
209 + // exists to keep out.
210 + assert!(css.contains("--gap-pane"), "no compact shell override");
211 + let compact = css
212 + .split("@media (max-width")
213 + .nth(1)
214 + .expect("compact block");
215 + assert!(
216 + !compact.contains("--gap-peer"),
217 + "a control gap crept into a width query"
218 + );
193 219 }
194 220
195 221 #[test]