BlueGit

timfa 66wiki

Files

66wiki / web / main.css

main.css

logo back to home page
timfa Tim · pushed by timfa · 11 months ago
8e22e661 History
main.css 3.8 KiB Download Raw
1/* -------- Reset / Base -------- */
2
3*,
4*::before,
5*::after {
6 box-sizing: border-box;
7}
8
9html {
10 font-size: 16px;
11}
12
13body {
14 margin: 0;
15 padding: 0;
16 font-family: system-ui, -apple-system, BlinkMacSystemFont,
17 "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
18 "Helvetica Neue", Arial, sans-serif;
19 line-height: 1.55;
20 color: #1f1f1f;
21 background-color: #f7f7f8;
22}
23
24/* -------- Text -------- */
25
26h1,
27h2,
28h3,
29h4,
30h5,
31h6 {
32 font-weight: 600;
33 line-height: 1.25;
34 margin: 0;
35}
36
37h1 {
38 font-size: 2rem;
39}
40
41h2 {
42 font-size: 1.4rem;
43}
44
45h3 {
46 font-size: 1.15rem;
47}
48
49p {
50 margin: 0.5rem 0;
51}
52
53small {
54 font-size: 0.85rem;
55 opacity: 0.85;
56}
57
58/* -------- Links -------- */
59
60a {
61 color: #2c5ec2;
62 text-decoration: none;
63}
64
65a:hover {
66 text-decoration: underline;
67}
68
69/* -------- Lists -------- */
70
71ul,
72ol {
73 margin: 0.5rem 0;
74 padding-left: 1.25rem;
75}
76
77/* -------- Utility -------- */
78
79code,
80pre {
81 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco,
82 Consolas, "Liberation Mono", "Courier New", monospace;
83 font-size: 0.95em;
84}
85
86pre {
87 background: #eee;
88 padding: 0.75rem;
89 border-radius: 8px;
90 overflow-x: auto;
91}
92
93/* -------- Page Containers -------- */
94
95.page {
96 max-width: 1200px;
97 margin: 0 auto;
98 padding: 1rem;
99}
100
101/* -------- Cards (shared feel) -------- */
102
103article {
104 background: #ffffff;
105}
106
107/* -------- Accessibility -------- */
108
109:focus-visible {
110 outline: 2px solid #5a8dee;
111 outline-offset: 2px;
112}
113
114/* -------- Dark-mode friendly base -------- */
115/* (Optional – remove if unwanted) */
116@media (prefers-color-scheme: dark) {
117 body {
118 background-color: #141416;
119 color: #e8e8ea;
120 }
121
122 article {
123 background: #1c1c1f;
124 }
125
126 a {
127 color: #7aa2ff;
128 }
129
130 pre {
131 background: #26262a;
132 }
133}
134
135.topBar {
136 position: sticky;
137 top: 0;
138 z-index: 999;
139 background: #ffffff;
140 border-bottom: 1px solid #ddd;
141}
142
143.topBarInner {
144 max-width: 1200px;
145 margin: 0 auto;
146 padding: 0.6rem 1rem;
147 display: flex;
148 align-items: center;
149 gap: 0.75rem;
150}
151
152.menuButton {
153 border: 1px solid #bbb;
154 background: #fff;
155 border-radius: 10px;
156 padding: 0.45rem 0.7rem;
157 cursor: pointer;
158}
159
160.menuButton:hover {
161 background: #f2f2f2;
162}
163
164.chapterPicker {
165 position: relative;
166}
167
168.chapterDropdown {
169 display: none;
170 position: absolute;
171 top: calc(100% + 0.4rem);
172 left: 0;
173 width: min(360px, 85vw);
174 max-height: 55vh;
175 overflow: auto;
176 border: 1px solid #ddd;
177 border-radius: 12px;
178 background: #fff;
179 box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
180 padding: 0.35rem;
181}
182
183.chapterDropdown.open {
184 display: block;
185}
186
187.chapterDropdown button {
188 width: 100%;
189 text-align: left;
190 border: 0;
191 background: transparent;
192 padding: 0.55rem 0.6rem;
193 border-radius: 10px;
194 cursor: pointer;
195}
196
197.chapterDropdown button:hover {
198 background: #f3f3f3;
199}
200
201.searchForm {
202 margin-left: auto;
203 display: flex;
204 gap: 0.5rem;
205 align-items: center;
206}
207
208.headerImage {
209 max-height: 32px;
210}
211
212.inlineImage {
213 align-content: center;
214 text-align: center;
215}
216
217.searchResultArticle {
218 border: 1px solid #ddd;
219 border-radius: 12px;
220 padding: 1rem;
221 margin: 0.75rem 0;
222}
223
224.searchResult {
225 display: flex;
226 gap: 0.75rem;
227 flex-wrap: wrap;
228 align-items: baseline;
229}
230
231hit {
232 background-color: #ffffcc;
233}
234
235.searchInput {
236 width: min(420px, 45vw);
237 border: 1px solid #bbb;
238 border-radius: 999px;
239 padding: 0.45rem 0.75rem;
240}
241
242.searchSubmit {
243 border: 1px solid #bbb;
244 border-radius: 999px;
245 padding: 0.45rem 0.75rem;
246 cursor: pointer;
247}
248
249.searchSubmit:hover {
250 background: #f2f2f2;
251}
252
253/* Make sure content doesn't hide behind sticky bar when using anchor links */
254:target {
255 scroll-margin-top: 0px;
256}