diff --git a/src/App.css b/src/App.css index 1de404c..ea17b9c 100644 --- a/src/App.css +++ b/src/App.css @@ -109,6 +109,8 @@ button, padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); + padding-left: 0; + padding-right: 0; } /* Touch devices: bigger hit targets, no hover-only behaviour */ @@ -117,12 +119,7 @@ button, select, input[type='checkbox'], input[type='radio'] { - min-height: 44px; - } - - ::-webkit-scrollbar { - width: 0; - height: 0; + min-height: var(--touch-target); } } diff --git a/src/components/Sidebar/Sidebar.css b/src/components/Sidebar/Sidebar.css index 622ad8b..03853b9 100644 --- a/src/components/Sidebar/Sidebar.css +++ b/src/components/Sidebar/Sidebar.css @@ -491,19 +491,19 @@ /* Touch-sized items */ .sidebar-item, .sidebar-item--editing { - height: 44px; + height: var(--touch-target); } .sidebar-rail--expanded .sidebar-item { width: 100%; } .sidebar-toggle { - height: 40px; + height: calc(var(--touch-target) * 0.9); } /* Preset dropdown */ .sidebar-app-trigger, .sidebar-app-input { - height: 40px; + height: calc(var(--touch-target) * 0.9); } .sidebar-app-input, .sidebar-item-input { @@ -517,4 +517,17 @@ padding: var(--space-3) var(--space-2); font-size: var(--font-sm); } +} + +@media (max-width: 768px), (max-height: 500px) and (pointer: coarse) { + .sidebar-label, + .sidebar-item-input { + font-size: max(20px, var(--font-sm)); + } + + .sidebar-app-trigger, + .sidebar-app-input, + .sidebar-app-option { + font-size: max(13px, var(--font-xs)); + } } \ No newline at end of file diff --git a/src/variables.css b/src/variables.css index 440ed22..5f15e12 100644 --- a/src/variables.css +++ b/src/variables.css @@ -72,21 +72,21 @@ --transition-base: 180ms; /* ---------- Header ---------- */ - --header-height: 50px; + --header-height: 2.8rem; --font-size-header: 1rem; --tab-height: calc(var(--header-height) * 0.75); /* ---------- Card ---------- */ --card-width: 500px; - --card-control-height: 40px; + --card-control-height: 2.2rem; /* ---------- Button ---------- */ --disabled-opacity: 0.45; /* ---------- SideBar ---------- */ --sidebar-width-collapsed: calc(var(--header-height) * 0.85 + 2 * var(--space-3)); - --sidebar-width-expanded: 200px; + --sidebar-width-expanded: 11rem; /* ---------- DSP ---------- */ --dsp-control-heigth: 40%; @@ -97,13 +97,15 @@ --safe-left: env(safe-area-inset-left, 0px); --safe-right: env(safe-area-inset-right, 0px); --topbar-h: calc(var(--header-height) + var(--safe-top)); + --touch-target: 2.45rem; } -@media (max-width: 768px) { +@media (max-width: 768px), (max-height: 500px) and (pointer: coarse) { :root { - --header-height: 56px; - --tab-height: 40px; - --sidebar-width-collapsed: 56px; - --sidebar-width-expanded: min(80vw, 280px); + --header-height: 3.1rem; + --tab-height: 2.2rem; + --sidebar-width-collapsed: 3.1rem; + --sidebar-width-expanded: min(80vw, 15.5rem); + --touch-target: 2.45rem; } } \ No newline at end of file