base.css
⎇
Raw
1/* View Transitions */
2@view-transition {
3 navigation: auto;
4}
5
6.site-nav {
7 view-transition-name: site-nav;
8}
9.repo-header {
10 view-transition-name: repo-header;
11}
12.breadcrumb {
13 view-transition-name: breadcrumb;
14}
15
16/* ============================================================
17 @layer reset
18 ============================================================ */
19@layer reset {
20 *,
21 *::before,
22 *::after {
23 box-sizing: border-box;
24 margin: 0;
25 padding: 0;
26 }
27
28 html {
29 -webkit-text-size-adjust: 100%;
30 text-size-adjust: 100%;
31 }
32 body {
33 min-height: 100dvh;
34 /* Tested floor. Narrower windows scroll instead of squeezing. */
35 min-width: 320px;
36 }
37 img,
38 video {
39 max-width: 100%;
40 height: auto;
41 }
42 button,
43 input,
44 textarea,
45 select {
46 font: inherit;
47 color: inherit;
48 }
49 a {
50 color: inherit;
51 }
52 ul,
53 ol {
54 list-style: none;
55 }
56 h1,
57 h2,
58 h3,
59 h4,
60 h5,
61 h6 {
62 font-weight: 600;
63 line-height: 1.25;
64 overflow-wrap: anywhere;
65 }
66 pre,
67 code {
68 font-family: var(--font-mono);
69 }
70 summary {
71 cursor: pointer;
72 }
73 :focus-visible {
74 outline: 2px solid var(--color-accent);
75 outline-offset: 2px;
76 }
77}
78
79/* ============================================================
80 @layer tokens
81 ============================================================ */
82@layer tokens {
83 :root {
84 color-scheme: light;
85
86 /* Colors — light */
87 --color-bg: #ffffff;
88 --color-bg-subtle: #f6f8fa;
89 --color-bg-inset: #eef0f2;
90 --color-border: #d0d7de;
91 --color-border-muted: #e4e7eb;
92 --color-text: #1f2328;
93 --color-text-muted: #656d76;
94 --color-link: #0969da;
95 --color-link-hover: #0550ae;
96
97 --color-accent: #fd7e14;
98 --color-accent-bg: #fff3cd;
99
100 --color-success: #1a7f37;
101 --color-success-bg: #dafbe1;
102 --color-danger: #cf222e;
103 --color-danger-bg: #ffebe9;
104 --color-warning: #9a6700;
105 --color-warning-bg: #fff8c5;
106 --color-merged: #8250df;
107 --color-merged-bg: #fbefff;
108 --color-info: #0b5cab;
109
110 /* Typography */
111 --font-sans:
112 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
113 --font-mono:
114 ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
115
116 --text-xs: 0.75rem;
117 --text-sm: 0.875rem;
118 --text-base: 1rem;
119 --text-lg: 1.125rem;
120 --text-xl: 1.25rem;
121 --text-2xl: 1.5rem;
122 --text-3xl: 1.875rem;
123
124 /* Spacing */
125 --space-1: 0.25rem;
126 --space-2: 0.5rem;
127 --space-3: 0.75rem;
128 --space-4: 1rem;
129 --space-5: 1.25rem;
130 --space-6: 1.5rem;
131 --space-8: 2rem;
132 --space-10: 2.5rem;
133 --space-12: 3rem;
134 --space-16: 4rem;
135
136 /* Page gutter: shrinks with the viewport, no breakpoint needed. */
137 --gutter: clamp(var(--space-3), 3vw, var(--space-6));
138
139 /* Border radius */
140 --radius-sm: 4px;
141 --radius-md: 6px;
142 --radius-lg: 8px;
143 --radius-full: 9999px;
144
145 /* Shadows */
146 --shadow-sm: 0 1px 0 rgba(27, 31, 36, 0.04);
147 --shadow-md: 0 3px 6px rgba(140, 149, 159, 0.15);
148 --shadow-lg: 0 8px 24px rgba(140, 149, 159, 0.2);
149 --shadow-popup: 0 4px 16px rgba(0, 0, 0, 0.14);
150 }
151
152 @media (prefers-color-scheme: dark) {
153 :root {
154 color-scheme: dark;
155 --color-bg: #0d1117;
156 --color-bg-subtle: #161b22;
157 --color-bg-inset: #1c2128;
158 --color-border: #30363d;
159 --color-border-muted: #21262d;
160 --color-text: #e6edf3;
161 --color-text-muted: #7d8590;
162 --color-link: #58a6ff;
163 --color-link-hover: #79c0ff;
164
165 --color-accent: #f0883e;
166 --color-accent-bg: #3d2f00;
167
168 --color-success: #3fb950;
169 --color-success-bg: #0d2b19;
170 --color-danger: #f85149;
171 --color-danger-bg: #2d1419;
172 --color-warning: #d29922;
173 --color-warning-bg: #2c2000;
174 --color-merged: #bc8cff;
175 --color-merged-bg: #1e0b3e;
176 --color-info: #388bfd;
177 --shadow-popup: 0 4px 16px rgba(0, 0, 0, 0.5);
178 }
179 }
180
181 /* Explicit theme overrides — applied via data-theme attribute set by cookie */
182 :root[data-theme="dark"] {
183 color-scheme: dark;
184 --color-bg: #0d1117;
185 --color-bg-subtle: #161b22;
186 --color-bg-inset: #1c2128;
187 --color-border: #30363d;
188 --color-border-muted: #21262d;
189 --color-text: #e6edf3;
190 --color-text-muted: #7d8590;
191 --color-link: #58a6ff;
192 --color-link-hover: #79c0ff;
193 --color-accent: #f0883e;
194 --color-accent-bg: #3d2f00;
195 --color-success: #3fb950;
196 --color-success-bg: #0d2b19;
197 --color-danger: #f85149;
198 --color-danger-bg: #2d1419;
199 --color-warning: #d29922;
200 --color-warning-bg: #2c2000;
201 --color-merged: #bc8cff;
202 --color-merged-bg: #1e0b3e;
203 --color-info: #388bfd;
204 --shadow-popup: 0 4px 16px rgba(0, 0, 0, 0.5);
205 }
206 :root[data-theme="light"] {
207 color-scheme: light;
208 --color-bg: #ffffff;
209 --color-bg-subtle: #f6f8fa;
210 --color-bg-inset: #eef0f2;
211 --color-border: #d0d7de;
212 --color-border-muted: #e4e7eb;
213 --color-text: #1f2328;
214 --color-text-muted: #656d76;
215 --color-link: #0969da;
216 --color-link-hover: #0550ae;
217 --color-accent: #fd7e14;
218 --color-accent-bg: #fff3cd;
219 --color-success: #1a7f37;
220 --color-success-bg: #dafbe1;
221 --color-danger: #cf222e;
222 --color-danger-bg: #ffebe9;
223 --color-warning: #9a6700;
224 --color-warning-bg: #fff8c5;
225 --color-merged: #8250df;
226 --color-merged-bg: #fbefff;
227 --color-info: #0b5cab;
228 --shadow-popup: 0 4px 16px rgba(0, 0, 0, 0.14);
229 }
230}
231
232/* ============================================================
233 @layer layout
234 ============================================================ */
235@layer layout {
236 body {
237 font-family: var(--font-sans);
238 font-size: var(--text-base);
239 line-height: 1.5;
240 color: var(--color-text);
241 background: var(--color-bg);
242 display: grid;
243 grid-template-rows: auto 1fr auto;
244 grid-template-columns: minmax(0, 1fr);
245 min-height: 100dvh;
246 }
247
248 .site-header {
249 background: var(--color-bg-subtle);
250 border-bottom: 1px solid var(--color-border);
251 position: sticky;
252 top: 0;
253 z-index: 100;
254 }
255
256 .site-nav {
257 max-width: 1200px;
258 margin: 0 auto;
259 padding: var(--space-3) var(--gutter);
260 display: flex;
261 align-items: center;
262 gap: var(--space-4);
263 min-width: 0;
264 }
265
266 .site-logo {
267 display: flex;
268 align-items: center;
269 gap: var(--space-2);
270 text-decoration: none;
271 font-weight: 700;
272 font-size: var(--text-lg);
273 color: var(--color-text);
274 min-width: 0;
275 }
276 .logo-text {
277 min-width: 0;
278 overflow: hidden;
279 text-overflow: ellipsis;
280 white-space: nowrap;
281 }
282
283 .logo-icon {
284 width: 1.6em;
285 height: 1.6em;
286 display: block;
287 flex-shrink: 0;
288 }
289
290 .nav-links {
291 margin-left: auto;
292 display: flex;
293 align-items: center;
294 gap: var(--space-3);
295 min-width: 0;
296 }
297 /* Signed in: the user name gives way first, the logo keeps its text. */
298 .site-nav:has(.nav-user) .site-logo {
299 flex-shrink: 0;
300 }
301
302 .site-main {
303 padding: clamp(var(--space-4), 4vw, var(--space-8)) var(--gutter);
304 min-width: 0;
305 }
306
307 .site-footer {
308 text-align: center;
309 padding: var(--space-6) var(--gutter);
310 font-size: var(--text-sm);
311 color: var(--color-text-muted);
312 border-top: 1px solid var(--color-border);
313 }
314
315 .container {
316 max-width: 1000px;
317 margin: 0 auto;
318 min-width: 0;
319 }
320
321 .container-narrow {
322 max-width: 680px;
323 }
324
325 .inline-form {
326 display: inline;
327 }
328
329 /* --- Two-step confirmation popups (details/summary) --- */
330 .confirm-details {
331 position: relative;
332 display: inline-block;
333 }
334 .confirm-details > summary {
335 list-style: none;
336 }
337 .confirm-details > summary::-webkit-details-marker {
338 display: none;
339 }
340
341 .confirm-popup {
342 position: absolute;
343 right: 0;
344 top: calc(100% + var(--space-1));
345 background: var(--color-bg);
346 border: 1px solid var(--color-border);
347 border-radius: var(--radius-md);
348 box-shadow: var(--shadow-popup);
349 padding: var(--space-3) var(--space-4);
350 width: max-content;
351 max-width: min(24rem, calc(100vw - 2 * var(--gutter)));
352 z-index: 100;
353 font-size: var(--text-sm);
354 line-height: 1.6;
355 color: var(--color-text-muted);
356 text-align: left;
357 }
358 .confirm-popup > .btn,
359 .confirm-popup > .inline-form {
360 margin-left: var(--space-2);
361 vertical-align: middle;
362 }
363 .confirm-popup > .popup-form {
364 margin-top: var(--space-2);
365 }
366}
367