mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 06:40:50 +00:00
fix(mobile): keep form fields at 16 px on every touch screen
iOS and iPadOS Safari zoom the page into any focused field whose text is below 16 px. The fields switched to 14 px at a width breakpoint (`md:text-sm`, `sm:text-sm`), which a phone held sideways (844 px) and every iPad pass, and the native select was 14 px at every width, so the profile settings zoomed on a portrait phone too. A `pointer-fine:` variant (a mouse or trackpad is the primary pointer) now gates the compact size on Input, Textarea, NativeSelect, DateField, TimeField and the Coach composer; touch screens keep 16 px at any width and the desktop look is unchanged.
This commit is contained in:
1 parent
ac212cf6b7
commit
56a3008cf0
8 files changed
+41
-17
No files matched your search
@@ -32,6 +32,20 @@
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
/*
|
||||
* `pointer-fine:` — a mouse or trackpad is the primary pointer. Form fields
|
||||
* take the compact 14 px type only under it: iOS and iPadOS Safari zoom the
|
||||
* page into any focused field whose text is smaller than 16 px, and a width
|
||||
* breakpoint alone (`md:text-sm`) handed 14 px to a phone held sideways
|
||||
* (844 px) and to every iPad. Touch-first screens keep the 16 px base at
|
||||
* every width.
|
||||
*/
|
||||
@custom-variant pointer-fine {
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
@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