fix(ui): burger section sheet at phone width, 36px control scale
The coarse-pointer rule gave every button, link and field a 44px minimum on touch, which made the phone dashboard look like a toy and pushed the section strip into overlapping its neighbours. Controls now keep their own size, and the shared ladder is one step taller (default 36px, sm 32px) so a finger still hits something. Inputs stay 16px only where iOS would zoom. Below md the sections move into a sheet with the current page marked; the bar keeps brand, search, alerts and the operator. Page titles drop to 18px so the title and its action sit on one centred line.
This commit is contained in:
1 parent
0d4b83862c
commit
8ea5ad6faf
16 files changed
+88
-49
No files matched your search
+7
-24
@@ -254,31 +254,14 @@
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
/* Fingers need 44px targets (WCAG 2.5.5). Min sizes rather than heights, so
|
||||
a component's own sizing still applies wherever it is already larger,
|
||||
and inline links in prose are unaffected because min sizes do not apply
|
||||
to inline boxes. Only a coarse pointer means a finger: a narrow window on
|
||||
a desktop still uses a mouse. Switches and tab triggers are exempt because
|
||||
they shrink their own box (a switch draws its hit area with ::after, tabs
|
||||
share a fixed-height strip), so a min size deforms them instead. */
|
||||
/* Rows in a floating menu are the one thing a finger cannot aim at with a
|
||||
mouse's precision, and a min height there cannot deform a layout because
|
||||
the panel is sized by its content. Everything else keeps its own size:
|
||||
min sizes on buttons, links and fields made every control on a phone 44px
|
||||
tall and 44px wide, which is what made the dashboard look like a toy. */
|
||||
@media (pointer: coarse) {
|
||||
:where(
|
||||
button:not([role="switch"], [role="tab"]),
|
||||
a[href],
|
||||
summary,
|
||||
select,
|
||||
textarea,
|
||||
input:not([type="checkbox"], [type="radio"], [type="hidden"]),
|
||||
[role="button"],
|
||||
[role="menuitem"],
|
||||
[role="option"]
|
||||
) {
|
||||
min-height: 44px;
|
||||
min-width: 44px;
|
||||
}
|
||||
/* Tabs fill their list, so the list carries the touch height instead. */
|
||||
[data-slot="tabs-list"] {
|
||||
min-height: 44px;
|
||||
:where([role="menuitem"], [role="option"]) {
|
||||
min-height: 2.75rem;
|
||||
}
|
||||
}
|
||||
/* An accessibility invariant, not a nicety: nothing animates for someone
|
||||
|
||||
Reference in new issue
Block a user