|
5 | 5 | :root { |
6 | 6 | /*--font-main: "Crimson Pro", "EB Garamond", Georgia, "Times New Roman", Times, serif;*/ |
7 | 7 | --font-main: "Atkinson Hyperlegible Next", Georgia, "Times New Roman", Times, serif; |
| 8 | + --bnh: env(safe-area-inset-bottom); /* native bottom nav height */ |
| 9 | + --tnh: env(safe-area-inset-top); /* native top nav height */ |
| 10 | + --hloss: calc(var(--bnh) + var(--tnh)); /* mobile height loss due to native top and bottom bars */ |
| 11 | +} |
| 12 | + |
| 13 | +.safe-top { |
| 14 | + /*padding-top: calc(20px);*/ |
| 15 | + padding-top: env(safe-area-inset-top); |
| 16 | + box-sizing: border-box; /* ensure padding doesn’t break layout */ |
| 17 | +} |
| 18 | + |
| 19 | +.safe-bottom { |
| 20 | + /*bottom: calc(48px);*/ |
| 21 | + bottom: env(safe-area-inset-bottom); |
| 22 | +} |
| 23 | + |
| 24 | +.keyboard-open .pb-page-base { |
| 25 | + padding-bottom: calc(61px); |
| 26 | +} |
| 27 | + |
| 28 | +.pb-page-base { |
| 29 | + padding-bottom: calc(61px + env(safe-area-inset-bottom)); |
| 30 | + /*bottom: calc(48px);*/ |
| 31 | + /*padding-bottom: env(safe-area-inset-bottom);*/ |
| 32 | +} |
| 33 | + |
| 34 | +/* When keyboard is open, remove safe area offset */ |
| 35 | +.keyboard-open .safe-bottom { |
| 36 | + bottom: 0; |
| 37 | +} |
| 38 | + |
| 39 | +.keyboard-open { |
| 40 | + --bnh: 0; |
| 41 | + /*--tnh: 0;*/ |
| 42 | + --hloss: var(--tnh); |
| 43 | +} |
| 44 | + |
| 45 | +/* Replace default Tailwind behavior */ |
| 46 | +.min-h-screen { |
| 47 | + min-height: calc(1dvh * 100 - var(--hloss)); |
8 | 48 | } |
9 | 49 |
|
10 | 50 | .main-font { |
@@ -450,14 +490,3 @@ ol > li::marker { |
450 | 490 | color: #374151; /* pick a visible color */ |
451 | 491 | } |
452 | 492 |
|
453 | | -.safe-top { |
454 | | - /*padding-top: calc(20px);*/ |
455 | | - padding-top: env(safe-area-inset-top); |
456 | | - box-sizing: border-box; /* ensure padding doesn’t break layout */ |
457 | | -} |
458 | | - |
459 | | -.safe-bottom { |
460 | | - /*bottom: calc(48px);*/ |
461 | | - bottom: env(safe-area-inset-bottom); |
462 | | -} |
463 | | - |
|
0 commit comments