mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-19 00:12:18 +00:00
Give touch screens 44 px targets through the primitives
A pointer-coarse variant sits beside the pointer-fine one. Under it the default, small and icon buttons, tab triggers, the sidebar rail rows and the phone logo link reach the 44 px touch floor; a mouse keeps the compact desktop density. The rail's height steps now apply to a mouse only. A phone held sideways crosses the md breakpoint at about 390 px of height, where the fixed footer left the list three rows: there the whole rail scrolls as one column, without a native scrollbar.
This commit is contained in:
1 parent
492c2a4131
commit
3a20f23f0f
5 files changed
+37
-8
No files matched your search
@@ -46,6 +46,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* `pointer-coarse:` — a finger is the primary pointer. The control
|
||||
* primitives (Button, tab triggers, the sidebar rail rows) grow their hit
|
||||
* area to the 44 px touch floor under it, so a phone or a touch tablet gets
|
||||
* reachable targets while a mouse keeps the compact desktop density.
|
||||
*/
|
||||
@custom-variant pointer-coarse {
|
||||
@media (pointer: coarse) {
|
||||
@slot;
|
||||
}
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
/* Extra-small breakpoint (30rem / 480px) for the narrowest phones — the
|
||||
default scale starts at sm (640px), which leaves a gap between an iPhone SE
|
||||
|
||||
Reference in new issue
Block a user