oficina / estilo Public

chrome: the compact breakpoints in px

Fable on c56314e, LOW: the compact bar's 44rem, 43.99rem and 30rem
breakpoints parted from the 800px ones at a reader's larger default font
size (at 20px, 44rem is 880px, past 800px). They are px now, as 800px
is: 703.98px and 704px for the compact pair, 480px for a phone held
sideways, in chrome.css, the generated band and chrome.js alike
(TestTheScriptUsesTheCSSBreakpoints refuses a rem breakpoint).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 66b599efcae04eb06598f7076a354274404d6683 parent 840b8a5
4 files changed, +12 −7
  • chrome/chrome.css +4 −3
  • chrome/chrome.go +1 −1
  • chrome/chrome.js +1 −1
  • chrome/compact_test.go +6 −2
diff --git a/chrome/chrome.css b/chrome/chrome.css
index 4f46d45..b7f230a 100644
--- a/chrome/chrome.css
+++ b/chrome/chrome.css
@@ -779,7 +779,7 @@
here, and these, which undo the narrow two-row layout below 800px and
put its actions back in the bar. A compact bar with nav keeps its Menu
sheet there, as below 800px every bar does. */
-@media (min-width: 44rem) and (max-width: 799.98px) and (not ((max-height: 30rem) and (pointer: coarse))) {
+@media (min-width: 704px) and (max-width: 799.98px) and (not ((max-height: 480px) and (pointer: coarse))) {
[estilo-bar~="stacked"][estilo-bar~="compact"] { display: flex; block-size: var(--estilo-bar-block-size); }
[estilo-bar~="stacked"][estilo-bar~="compact"] [estilo-bar-menubar] { align-self: auto; margin-inline-end: 0; }
[estilo-bar~="compact"] [estilo-bar-actions] { display: flex; }
@@ -819,7 +819,8 @@
commands, and the app's other screens the person's menus (native D4).
From 704px none of this applies, and the bar is the 56px header
(from 800px every stacked bar's; between 704px and 800px a compact
- bar's alone, above). A compact bar with
+ bar's alone, above). The breakpoints are px, as 800px is, so they
+ never part at a reader's larger default font size. A compact bar with
Bar.Nav keeps its Menu sheet, in the row, so the nav is never out of
reach. Every rule is keyed on a compact hook:
[estilo-bar~="compact"], [estilo-bar-back], [estilo-bar-trail],
@@ -887,7 +888,7 @@
border: 0;
background: light-dark(rgb(0 0 0 / 0.045), rgb(0 0 0 / 0.25));
}
-@media (max-width: 43.99rem), (max-height: 30rem) and (pointer: coarse) {
+@media (max-width: 703.98px), (max-height: 480px) and (pointer: coarse) {
:root:has([estilo-bar~="compact"]) { --estilo-bar-block-size: 3.25rem; } /* 52px: the one row. PUBLIC */
[estilo-bar~="compact"] {
display: flex;
diff --git a/chrome/chrome.go b/chrome/chrome.go
index 41b994f..d4ef5ef 100644
--- a/chrome/chrome.go
+++ b/chrome/chrome.go
@@ -61,7 +61,7 @@ func CSS() []byte { return append([]byte(nil), built...) }
const (
wideOpens = "/* From 800px, the 56px stacked header:"
wideQuery = "@media (min-width: 800px) {"
- bandQuery = "@media (min-width: 44rem) and (max-width: 799.98px) and (not ((max-height: 30rem) and (pointer: coarse)))"
+ bandQuery = "@media (min-width: 704px) and (max-width: 799.98px) and (not ((max-height: 480px) and (pointer: coarse)))"
)
func buildCSS(src string) []byte {
diff --git a/chrome/chrome.js b/chrome/chrome.js
index 7a7c44b..0c3e7a3 100644
--- a/chrome/chrome.js
+++ b/chrome/chrome.js
@@ -114,7 +114,7 @@
// Where a compact bar is the phone's one row, chrome.css's own query:
// below 704px, or a phone held sideways. Its title field fills the room
// there and is not fitted.
- const compact = window.matchMedia && window.matchMedia('(max-width: 43.99rem), (max-height: 30rem) and (pointer: coarse)')
+ const compact = window.matchMedia && window.matchMedia('(max-width: 703.98px), (max-height: 480px) and (pointer: coarse)')
const FIT = '[estilo-bar-title-input][size]'
const CARET = 2
const fit = (input) => {
diff --git a/chrome/compact_test.go b/chrome/compact_test.go
index c73d00a..2ed3960 100644
--- a/chrome/compact_test.go
+++ b/chrome/compact_test.go
@@ -30,9 +30,10 @@ func compact() Bar {
// compact bar, is already the 56px desktop header that every other
// stacked bar starts at 800px (Paul, 2026-11-28: the desktop header from
// 704px for an iPad in portrait; Fable on c56314e: Mapa and Fichas stack
-// too, and their own layouts break at 800px).
+// too, and their own layouts break at 800px). In px, as the 800px
+// breakpoint is, so the two never part at a reader's larger default font.
// (bandQuery is chrome.go's.)
-const narrowQuery = "@media (max-width: 43.99rem), (max-height: 30rem) and (pointer: coarse)"
+const narrowQuery = "@media (max-width: 703.98px), (max-height: 480px) and (pointer: coarse)"
// The Compact slot marks the bar compact and adds only what a compact bar
// needs: the Back chevron in the brand, the app's trail in the end group
@@ -180,6 +181,9 @@ func TestTheScriptUsesTheCSSBreakpoints(t *testing.T) {
if !strings.Contains(css, narrowQuery+" {") || !strings.Contains(css, bandQuery+" {") {
t.Error("chrome.css does not use the compact pair")
}
+ if strings.Contains(css, "43.99rem") || strings.Contains(css, "(min-width: 44rem)") {
+ t.Error("a rem breakpoint is left; at a larger default font it parts from 800px")
+ }
}
// Touch: every bar trigger is a 44px target on a coarse pointer, in every