|
1 | | -/** |
2 | | - * Any CSS included here will be global. The classic template |
3 | | - * bundles Infima by default. Infima is a CSS framework designed to |
4 | | - * work well for content-centric websites. |
5 | | - */ |
6 | | - |
7 | | -/* You can override the default Infima variables here. */ |
8 | | -:root { |
9 | | - --ifm-color-primary: #2e8555; |
10 | | - --ifm-color-primary-dark: #29784c; |
11 | | - --ifm-color-primary-darker: #277148; |
12 | | - --ifm-color-primary-darkest: #205d3b; |
13 | | - --ifm-color-primary-light: #33925d; |
14 | | - --ifm-color-primary-lighter: #359962; |
15 | | - --ifm-color-primary-lightest: #3cad6e; |
16 | | - --ifm-code-font-size: 95%; |
17 | | - --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); |
18 | | -} |
19 | | - |
20 | | -/* For readability concerns, you should choose a lighter palette in dark mode. */ |
21 | | -[data-theme='dark'] { |
22 | | - --ifm-color-primary: #25c2a0; |
23 | | - --ifm-color-primary-dark: #21af90; |
24 | | - --ifm-color-primary-darker: #1fa588; |
25 | | - --ifm-color-primary-darkest: #1a8870; |
26 | | - --ifm-color-primary-light: #29d5b0; |
27 | | - --ifm-color-primary-lighter: #32d8b4; |
28 | | - --ifm-color-primary-lightest: #4fddbf; |
29 | | - --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); |
30 | | -} |
31 | | - |
32 | | -/* Targeting screens smaller than 996px (Docusaurus mobile/tablet breakpoint) */ |
33 | | -@media screen and (max-width: 996px) { |
| 1 | +/* Mobile and Tablet optimizations */ |
| 2 | +@media (max-width: 996px) { |
34 | 3 | :root { |
35 | | - /* Reduce the base font size globally for mobile */ |
| 4 | + /* Reduce global base font size */ |
36 | 5 | --ifm-font-size-base: 14px; |
37 | | - |
38 | | - /* Shrink button padding and font size */ |
| 6 | + |
| 7 | + /* Shrink global button dimensions */ |
39 | 8 | --ifm-button-padding-vertical: 6px; |
40 | 9 | --ifm-button-padding-horizontal: 12px; |
41 | | - --ifm-button-font-size: 0.8rem; |
| 10 | + --ifm-button-font-size: 0.85rem; |
| 11 | + |
| 12 | + /* Adjust navbar item spacing for tighter fit */ |
| 13 | + --ifm-navbar-item-padding-horizontal: 8px; |
42 | 14 | } |
43 | 15 |
|
44 | | - /* Specific fix for input fields and textareas */ |
| 16 | + /* Fix for input fields and textareas */ |
45 | 17 | input, |
46 | | - textarea, |
47 | | - select { |
48 | | - font-size: 16px !important; /* Prevents iOS from auto-zooming on focus */ |
| 18 | + textarea, |
| 19 | + .navbar__search-input { |
| 20 | + font-size: 16px !important; /* Prevents browser auto-zoom on iOS */ |
49 | 21 | padding: 8px !important; |
50 | | - width: 100%; /* Ensures they don't overflow the container */ |
51 | | - box-sizing: border-box; |
| 22 | + height: auto !important; |
| 23 | + max-width: 100%; |
| 24 | + } |
| 25 | + |
| 26 | + /* Specific sizing for the Docusaurus Search Bar if it overflows */ |
| 27 | + .navbar__search { |
| 28 | + margin-left: 0.5rem; |
| 29 | + } |
| 30 | + |
| 31 | + .navbar__search-input { |
| 32 | + width: 140px; /* Constrains the width on narrow screens */ |
| 33 | + } |
| 34 | + |
| 35 | + .navbar__search-input:focus { |
| 36 | + width: 180px; /* Expands slightly when active */ |
| 37 | + } |
| 38 | + |
| 39 | + /* Reduce heading sizes on mobile to prevent layout breaking */ |
| 40 | + h1 { |
| 41 | + font-size: 1.75rem; |
| 42 | + } |
| 43 | + h2 { |
| 44 | + font-size: 1.5rem; |
| 45 | + } |
| 46 | + |
| 47 | + /* Adjust Hero buttons if they appear in your homepage components */ |
| 48 | + .buttons { |
| 49 | + display: flex; |
| 50 | + flex-direction: column; |
| 51 | + align-items: center; |
| 52 | + gap: 0.5rem; |
| 53 | + } |
| 54 | + |
| 55 | + .button--lg { |
| 56 | + padding: 0.6rem 1.2rem; |
| 57 | + font-size: 1rem; |
| 58 | + width: 100%; /* Makes buttons full-width on mobile for easier tapping */ |
| 59 | + max-width: 300px; |
| 60 | + } |
| 61 | +} |
| 62 | + |
| 63 | +/* Extra small devices (phones) */ |
| 64 | +@media (max-width: 480px) { |
| 65 | + :root { |
| 66 | + --ifm-font-size-base: 13px; |
52 | 67 | } |
53 | 68 |
|
54 | | - /* Adjust standard button classes if they feel too bulky */ |
55 | | - .button { |
56 | | - margin-bottom: 0.5rem; |
57 | | - display: inline-block; |
58 | | - width: auto; |
| 69 | + .navbar__brand { |
| 70 | + margin-right: 0.2rem; |
59 | 71 | } |
60 | 72 |
|
61 | | - /* If your inputs are inside a specific container that is too wide */ |
62 | | - .container { |
63 | | - padding-left: 1rem; |
64 | | - padding-right: 1rem; |
| 73 | + .navbar__title { |
| 74 | + font-size: 0.9rem; |
| 75 | + display: none; /* Optional: hides title text on very small screens to save space */ |
65 | 76 | } |
66 | 77 | } |
0 commit comments