From 64017b6b34a15438e03e6748349a610e827091b1 Mon Sep 17 00:00:00 2001 From: thislight Date: Tue, 13 Aug 2024 15:49:36 +0800 Subject: [PATCH] theme: fix input zoom in on iOS --- src/material/theme.css | 11 ++++++++++- src/timelines/TootBottomSheet.tsx | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/material/theme.css b/src/material/theme.css index 76bfab4..deacbe7 100644 --- a/src/material/theme.css +++ b/src/material/theme.css @@ -18,6 +18,12 @@ --body-size: 0.9375rem; } } + + input, + textarea { + /* iOS will zoom in if the font-size is smaller than 16px (or 1rem? i dont know) */ + font-size: 1rem; + } } [lang^="zh"], @@ -99,6 +105,7 @@ --tutu-anim-curve-sharp: cubic-bezier(0.4, 0, 0.6, 1); @media (max-width: 300px) { + /* XS screen, like wearables */ & { --tutu-transition-shadow: box-shadow 157.5ms var(--tutu-anim-curve-std); @@ -106,6 +113,7 @@ } @media (max-width: 600px) { + /* Mobile */ & { --tutu-transition-shadow: box-shadow 225ms var(--tutu-anim-curve-std); @@ -113,6 +121,7 @@ } @media (max-width: 1200px) { + /* Tablet */ & { --tutu-transition-shadow: box-shadow 292.5ms var(--tutu-anim-curve-std); @@ -139,4 +148,4 @@ body { font-size: var(--body-size, 1rem); -} +} \ No newline at end of file diff --git a/src/timelines/TootBottomSheet.tsx b/src/timelines/TootBottomSheet.tsx index 22b0946..a4d72c6 100644 --- a/src/timelines/TootBottomSheet.tsx +++ b/src/timelines/TootBottomSheet.tsx @@ -128,7 +128,7 @@ const TootBottomSheet: Component = (props) => {