Debian Codegraph @

www/src/assets/css/input.css

raw symbols SCIP
1 @import "tailwindcss";
2
3 @plugin "@tailwindcss/typography";
4 @plugin "@iconify/tailwind4";
5
6 /* Use `mac:` to gate utilities on Apple platforms. Detection is a tiny
7 synchronous script in <head> that sets [data-os="mac"] on <html>
8 before paint, so platform-specific UI never flashes the wrong state. */
9 @custom-variant mac ([data-os="mac"] &);
10
11 /* Self-hosted variable fonts (Inter, JetBrains Mono). Replaces the Google
12 Fonts CDN: no third-party request, no FOUT, subsets gated by unicode-range. */
13 @import "@fontsource-variable/inter/opsz.css";
14 @import "@fontsource-variable/inter/opsz-italic.css";
15 @import "@fontsource-variable/jetbrains-mono/wght.css";
16 @import "@fontsource-variable/jetbrains-mono/wght-italic.css";
17
18 @font-face {
19 font-family: 'ChicagoFLF';
20 src: url('/fonts/ChicagoFLF.ttf') format('truetype');
21 }
22
23 @theme {
24 /* Body */
25 --font-sans: 'Inter Variable', 'Inter', sans-serif;
26 /* Headings & Buttons */
27 --font-chicago: 'ChicagoFLF', sans-serif;
28 /* Code */
29 --font-mono: 'JetBrains Mono Variable', 'JetBrains Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
30
31 /* Gray tones
32
33 Text colors:
34 Primary (titles, body): neutral-700 / dark:neutral-300
35 Secondary (descriptions, labels, footer, breadcrumbs): neutral-600 / dark:neutral-400
36 Interact/hover: text-black / dark:text-white (max contrast)
37 Disabled: neutral-300 / dark:neutral-700
38 (exceptions exist when bg differs, e.g. FinderLink inverts text on colored bg)
39
40 Backgrounds:
41 Page: neutral-25 / dark:neutral-920
42 Header/Footer: neutral-10 / dark:neutral-920
43 Cards: neutral-25 / dark:neutral-910
44 Elevated (modals, code): white / dark:neutral-950
45 Hover state: neutral-75 / dark:neutral-875
46
47 Borders:
48 Primary: neutral-200 / dark:neutral-850
49 Hover: neutral-300 / dark:neutral-600
50
51 Links:
52 Default: blue-700 / dark:blue-350
53 Hover: blue-700 / dark:blue-300 */
54 --color-neutral-10: oklch(99.8% 0 0);
55 --color-neutral-25: oklch(99.5% 0 0);
56 --color-neutral-50: oklch(98.5% 0 0);
57 --color-neutral-75: oklch(97.8% 0 0);
58 --color-neutral-100: oklch(97% 0 0);
59 --color-neutral-150: oklch(95.6% 0 0);
60 --color-neutral-200: oklch(92.2% 0 0);
61 --color-neutral-300: oklch(87% 0 0);
62 --color-neutral-350: oklch(80.9% 0 0);
63 --color-neutral-400: oklch(70.8% 0 0);
64 --color-neutral-450: oklch(62.9% 0 0);
65 --color-neutral-500: oklch(55.6% 0 0);
66 --color-neutral-550: oklch(49.7% 0 0);
67 --color-neutral-600: oklch(43.9% 0 0);
68 --color-neutral-650: oklch(40.5% 0 0);
69 --color-neutral-700: oklch(37.1% 0 0);
70 --color-neutral-750: oklch(32.0% 0 0);
71 --color-neutral-800: oklch(26.9% 0 0);
72 --color-neutral-850: oklch(23.7% 0 0);
73 --color-neutral-875: oklch(22.1% 0 0);
74 --color-neutral-900: oklch(20.5% 0 0);
75 --color-neutral-910: oklch(19.3% 0 0);
76 --color-neutral-920: oklch(18.1% 0 0); /* primary dark mode background */
77 --color-neutral-930: oklch(16.9% 0 0);
78 --color-neutral-940: oklch(15.7% 0 0);
79 --color-neutral-950: oklch(14.5% 0 0);
80 /* Blue that matches htmx logo */
81 --color-blue-50: oklch(0.9714 0.0108 256.69);
82 --color-blue-100: oklch(0.9375 0.0235 250.08);
83 --color-blue-200: oklch(0.8908 0.043 249.39);
84 --color-blue-300: oklch(0.8196 0.0739 247.52);
85 --color-blue-350: oklch(0.7729 0.0925 249.30);
86 --color-blue-400: oklch(0.7262 0.111 251.08);
87 --color-blue-500: oklch(0.6393 0.1445 257.27);
88 --color-blue-600: oklch(0.5693 0.1653 261.81); /* htmx brand blue */
89 --color-blue-700: oklch(0.505 0.1698 264.24);
90 --color-blue-800: oklch(0.4421 0.1412 265.64);
91 --color-blue-900: oklch(0.3934 0.1075 265.08);
92 --color-blue-950: oklch(0.2936 0.068 267.21);
93
94 --radius-lg: 0.625rem;
95
96 --tracking-tightest: -0.075em;
97 }
98
99 @layer base {
100 /* Body styles */
101 body {
102 overflow-x: hidden;
103
104 color: var(--color-neutral-700);
105 background-color: var(--color-neutral-25);
106
107 @media (prefers-color-scheme: dark) {
108 color-scheme: dark;
109 color: var(--color-neutral-300);
110 background-color: var(--color-neutral-920);
111 }
112 }
113
114 button,
115 a,
116 [role="button"] {
117 touch-action: manipulation;
118 }
119
120 /* Respect user's motion preferences */
121 @media (prefers-reduced-motion: reduce) {
122 *, *::before, *::after {
123 animation-duration: 0.01ms !important;
124 animation-iteration-count: 1 !important;
125 transition-duration: 0.01ms !important;
126 scroll-behavior: auto !important;
127 }
128 }
129
130 /* Use Chicago font in headings */
131 h1, h2, h3, h4, h5, h6 {
132 font-family: var(--font-chicago), serif;
133 letter-spacing: var(--tracking-tightest);
134
135 @media (width >= 40rem) {
136 letter-spacing: var(--tracking-tight);
137 }
138 }
139
140 /* Improve underlines in anchors */
141 a, a * {
142 text-decoration-thickness: 0.125em;
143 text-underline-offset: 0.25em;
144 }
145
146 /* Astro/Shiki CSS Variables - Custom Theme */
147 :root {
148 --navigation-bar-height: 56px;
149
150 @media (width >= 64rem) {
151 --navigation-bar-height: 76px;
152 }
153
154 --header-height: var(--navigation-bar-height);
155 --construction-banner-height: 40px;
156
157 /* Base colors - light mode */
158 --astro-code-foreground: #1a1a1a;
159 --astro-code-background: var(--color-white);
160
161 /* HTML/Markup syntax */
162 --astro-code-token-string-expression: #bca26c; /* HTML tags (yellow) */
163 --astro-code-token-function: #5a5a5a; /* HTML attributes (neutral) */
164 --astro-code-token-keyword: #6aab73; /* Attribute = signs (green) */
165 --astro-code-token-string: #6aab73; /* Attribute values (green) */
166
167 /* JavaScript/Logic syntax */
168 --astro-code-token-constant: #ce8e6d; /* Keywords like function, async, export (orange) */
169 --astro-code-token-parameter: #57a8f5; /* Functions/methods (blue) */
170 --astro-code-token-punctuation: #c87dbb; /* Properties (purple) */
171
172 /* Other */
173 --astro-code-token-comment: #808080; /* Comments (gray) */
174 --astro-code-token-link: #57a8f5; /* Links (blue) */
175 }
176
177 /* Dark mode overrides with media query */
178 @media (prefers-color-scheme: dark) {
179 :root {
180 --astro-code-foreground: var(--color-neutral-350);
181 --astro-code-background: var(--color-neutral-930);
182 --astro-code-token-function: var(--color-neutral-350);
183 }
184 }
185 }
186
187 @utility scan-lines {
188 mask-size: 100% max(1.5px, 0.02em);
189 mask-image: linear-gradient(to bottom, transparent 0%, black 12.5%);
190
191 @variant dark {
192 mask-image: linear-gradient(to bottom, transparent 0%, black 17.5%);
193 }
194 }
195
196 /* Override prose pre padding with high specificity */
197 .prose pre,
198 .prose :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
199 padding: 0 !important;
200 }
201
202 /* Custom color theme for prose */
203 @utility prose-htmx {
204 /* Light Mode */
205 --tw-prose-body: var(--color-neutral-700);
206 --tw-prose-headings: var(--color-neutral-900);
207 --tw-prose-lead: var(--color-neutral-600);
208 --tw-prose-links: var(--color-blue-600);
209 --tw-prose-bold: var(--color-neutral-900);
210 --tw-prose-counters: var(--color-neutral-500);
211 --tw-prose-bullets: var(--color-neutral-300);
212 --tw-prose-hr: var(--color-neutral-200);
213 --tw-prose-quotes: var(--color-neutral-900);
214 --tw-prose-quote-borders: var(--color-neutral-200);
215 --tw-prose-captions: var(--color-neutral-500);
216 --tw-prose-code: var(--color-neutral-900);
217 --tw-prose-pre-code: var(--color-neutral-800);
218 --tw-prose-pre-bg: var(--color-neutral-50);
219 --tw-prose-th-borders: var(--color-neutral-300);
220 --tw-prose-td-borders: var(--color-neutral-200);
221
222 /* Dark Mode (for prose-invert) */
223 --tw-prose-invert-body: var(--color-neutral-300);
224 --tw-prose-invert-headings: var(--color-neutral-100);
225 --tw-prose-invert-lead: var(--color-neutral-400);
226 --tw-prose-invert-links: var(--color-blue-350);
227 --tw-prose-invert-bold: var(--color-neutral-100);
228 --tw-prose-invert-counters: var(--color-neutral-500);
229 --tw-prose-invert-bullets: var(--color-neutral-700);
230 --tw-prose-invert-hr: var(--color-neutral-850);
231 --tw-prose-invert-quotes: var(--color-neutral-100);
232 --tw-prose-invert-quote-borders: var(--color-neutral-850);
233 --tw-prose-invert-captions: var(--color-neutral-500);
234 --tw-prose-invert-code: var(--color-neutral-100);
235 --tw-prose-invert-pre-code: var(--color-neutral-300);
236 --tw-prose-invert-pre-bg: var(--color-neutral-900);
237 --tw-prose-invert-th-borders: var(--color-neutral-800);
238 --tw-prose-invert-td-borders: var(--color-neutral-850);
239 }
240
241 /* Prose CSS overrides */
242 .prose {
243 @apply
244 prose-a:no-underline!
245 prose-a:interact:underline!
246 prose-a:not-in-prose-headings:text-blue-700
247 prose-a:not-in-prose-headings:dark:text-blue-350!
248 prose-a:not-in-prose-headings:dark:interact:text-blue-300!
249 prose-a:[[href^="#"]]:text-neutral-800
250 prose-a:[[href^="#"]]:dark:text-neutral-100
251 prose-h1:text-[2em]/12
252 prose-img:rounded-lg
253 prose-img:border prose-img:border-neutral-200 prose-img:dark:border-neutral-800;
254
255 @apply
256 prose-headings:scroll-pt-[calc(var(--header-height)+2rem)]
257 prose-headings:scroll-mt-[calc(var(--header-height)+2rem)]
258 [html:has(#construction-banner)_&]:prose-headings:scroll-pt-[calc(var(--header-height)+var(--construction-banner-height)+2rem)]
259 [html:has(#construction-banner)_&]:prose-headings:scroll-mt-[calc(var(--header-height)+var(--construction-banner-height)+2rem)];
260
261 /* Inline code - remove backticks */
262
263 :where(:not(pre) > code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
264 @apply text-neutral-900 dark:text-neutral-100 font-semibold bg-neutral-200/25 dark:bg-neutral-800/25 px-1.5 py-0.5 rounded;
265
266 &::before, &::after {
267 content: none;
268 }
269 }
270
271 :where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)) > code {
272 color: inherit;
273 }
274
275 /* Code blocks - macOS window style */
276
277 :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
278 @apply relative border border-neutral-200 dark:border-neutral-850 rounded-lg bg-white dark:bg-neutral-950 overflow-y-hidden;
279
280 code {
281 @apply block overflow-x-auto text-sm font-medium leading-6 whitespace-pre p-4 pr-12 mask-l-from-97% mask-r-from-95%;
282 }
283 }
284
285 /* Details/Summary - collapsible sections */
286
287 :where(details):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
288 @apply my-6 py-0;
289
290 summary {
291 @apply flex w-full items-center cursor-pointer select-none text-sm
292 px-3 py-2 -mx-3 rounded-[4px]
293 text-neutral-600 dark:text-neutral-400
294 interact:bg-neutral-75 dark:interact:bg-neutral-875
295 interact:text-neutral-900 dark:interact:text-neutral-200
296 transition;
297
298 /* Robustly hide native markers */
299 &::-webkit-details-marker {
300 display: none;
301 }
302 &::marker {
303 content: '';
304 }
305
306 /* Custom inline chevron */
307 &::before {
308 @apply content-[''] inline-block size-4 mr-1.5 shrink-0
309 bg-current opacity-50 transition-transform;
310 mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z'/%3E%3C/svg%3E");
311 }
312 }
313
314 &[open] {
315 @apply pb-4;
316 }
317
318 &[open] summary {
319 @apply mb-4 text-neutral-900 dark:text-neutral-100;
320
321 &::before {
322 @apply rotate-90;
323 }
324 }
325
326 /* Tighter prose spacing inside details, zero indentation */
327 > :not(summary):nth-child(2) {
328 @apply mt-0;
329 }
330
331 > :not(summary):last-child {
332 @apply mb-0;
333 }
334
335 &.warning {
336 @apply px-4 py-0 rounded-[4px] border border-yellow-200 dark:border-yellow-900/50 bg-yellow-50/30 dark:bg-yellow-900/10;
337
338 summary {
339 @apply text-yellow-800 dark:text-yellow-300
340 interact:bg-transparent dark:interact:bg-transparent
341 interact:text-yellow-950 dark:interact:text-yellow-100;
342
343 &::before {
344 @apply opacity-60;
345 }
346 }
347
348 &[open] summary {
349 @apply text-yellow-900 dark:text-yellow-200;
350 }
351 }
352
353 &.info {
354 @apply px-4 py-0 rounded-[4px] border border-blue-200 dark:border-blue-900/50 bg-blue-50/30 dark:bg-blue-900/10;
355
356 summary {
357 @apply text-blue-800 dark:text-blue-300
358 interact:bg-transparent dark:interact:bg-transparent
359 interact:text-blue-950 dark:interact:text-blue-100;
360
361 &::before {
362 @apply opacity-60;
363 }
364 }
365
366 &[open] summary {
367 @apply text-blue-900 dark:text-blue-200;
368 }
369 }
370 }
371 }
372
373 @utility prose-lg {
374 /* Override h1 font size for prose-lg (with not-prose support) */
375 & :where(h1):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
376 font-size: 2em;
377 }
378 }
379
380 @utility text-shadow-3d-* {
381 text-shadow: 0 2px 0 color-mix(in srgb, --value(--color-*) 95%, white),
382 0 4px 0 color-mix(in srgb, --value(--color-*) 95%, black);
383 }
384
385 @utility shadow-3d-* {
386 box-shadow: 0 calc(var(--shadow-depth, 0.375cqh) / 2) 0 color-mix(in srgb, --value(--color-*) 95%, white),
387 0 var(--shadow-depth, 0.375cqh) 0 color-mix(in srgb, --value(--color-*) 95%, black);
388 }
389
390 @utility shadow-3d-depth-* {
391 --shadow-depth: --value([length], integer);
392 }
393
394 /* Subtle scrollbar styling */
395 @utility scrollbar-subtle {
396 /* Standard properties (Firefox, modern Chrome/Edge) */
397 scrollbar-width: thin;
398 scrollbar-color: var(--color-neutral-300) transparent;
399
400 @media (prefers-color-scheme: dark) {
401 scrollbar-color: var(--color-neutral-700) transparent;
402 }
403
404 /* WebKit (Chrome, Safari, Edge) - finer control */
405 &::-webkit-scrollbar {
406 width: 6px;
407 }
408
409 &::-webkit-scrollbar-track {
410 background: transparent;
411 }
412
413 &::-webkit-scrollbar-thumb {
414 background: var(--color-neutral-300);
415 border-radius: 3px;
416
417 &:hover {
418 background: var(--color-neutral-400);
419 }
420 }
421
422 @media (prefers-color-scheme: dark) {
423 &::-webkit-scrollbar-thumb {
424 background: var(--color-neutral-700);
425
426 &:hover {
427 background: var(--color-neutral-600);
428 }
429 }
430 }
431 }
432
433 /* interact: variant — use instead of hover: for interactive states.
434 Combines hover (pointer devices only), focus-visible, and active.
435 :active provides tap feedback on touch devices (requires the hacky touchstart listener in Head.astro). */
436 @custom-variant interact {
437 @media (hover: hover) {
438 &:hover {
439 @slot;
440 }
441 }
442 &:focus-visible {
443 @slot;
444 }
445
446 &:active {
447 @slot;
448 }
449 }
450
451
452 /* Demo window chrome — border, title bar with dots + label, content padding */
453 @layer components {
454 .demo-container {
455 position: relative;
456 margin-block: 2rem;
457 padding-top: 2rem;
458 border: 1px solid var(--color-neutral-200);
459 border-radius: var(--radius-lg);
460 background: var(--color-white);
461 overflow: hidden;
462
463 @variant dark {
464 border-color: var(--color-neutral-850);
465 background: var(--color-neutral-930);
466 }
467
468 /* Title bar */
469 &::before {
470 content: 'DEMO';
471 position: absolute;
472 inset: 0 0 auto 0;
473 height: 2rem;
474 display: flex;
475 align-items: center;
476 justify-content: center;
477 font-family: var(--font-sans);
478 font-size: 0.675rem;
479 font-weight: 500;
480 letter-spacing: 0.1em;
481 color: var(--color-neutral-500);
482 background: var(--color-neutral-50);
483 border-bottom: 1px solid var(--color-neutral-100);
484
485 @variant dark {
486 color: color-mix(in srgb, var(--color-neutral-500) 80%, transparent);
487 background: var(--color-neutral-920);
488 border-bottom-color: var(--color-neutral-900);
489 }
490 }
491
492 /* Traffic-light dots */
493 &::after {
494 content: '';
495 position: absolute;
496 top: calc((2rem - 9px) / 2);
497 left: 0.75rem;
498 width: 9px;
499 height: 9px;
500 border-radius: 9999px;
501 background: var(--color-neutral-200);
502 box-shadow: 15px 0 0 var(--color-neutral-200), 30px 0 0 var(--color-neutral-200);
503
504 @variant dark {
505 background: var(--color-neutral-800);
506 box-shadow: 15px 0 0 var(--color-neutral-800), 30px 0 0 var(--color-neutral-800);
507 }
508 }
509
510 /* Content area — padding-top includes title bar height */
511 padding: 1.5rem;
512 padding-top: calc(2rem + 1.5rem);
513 }
514 }