@farming-labs/svelte-theme 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ /* @farming-labs/svelte-theme — pixel-border theme (bundled)
2
+ * Single import: includes base docs.css + pixel-border overrides.
3
+ * Usage: @import "@farming-labs/svelte-theme/pixel-border/css";
4
+ */
5
+ @import "./docs.css";
6
+ @import "./pixel-border.css";
@@ -0,0 +1,601 @@
1
+ /*
2
+ * @farming-labs/svelte-theme — pixel-border theme
3
+ * Inspired by better-auth.com — clean dark UI, sharp corners, visible borders.
4
+ * Import AFTER docs.css to override the default neutral preset.
5
+ */
6
+
7
+ /* ─── Color Tokens (light) ───────────────────────────────────────── */
8
+
9
+ :root {
10
+ --color-fd-background: oklch(1 0 0);
11
+ --color-fd-foreground: oklch(0.147 0.004 49.25);
12
+ --color-fd-card: oklch(0.985 0.001 106.423);
13
+ --color-fd-card-foreground: oklch(0.147 0.004 49.25);
14
+ --color-fd-popover: oklch(1 0 0);
15
+ --color-fd-popover-foreground: oklch(0.147 0.004 49.25);
16
+ --color-fd-primary: oklch(0.216 0.006 56.043);
17
+ --color-fd-primary-foreground: oklch(0.985 0.001 106.423);
18
+ --color-fd-secondary: oklch(0.97 0.001 106.424);
19
+ --color-fd-secondary-foreground: oklch(0.216 0.006 56.043);
20
+ --color-fd-muted: oklch(0.97 0.001 106.424);
21
+ --color-fd-muted-foreground: oklch(0.553 0.013 58.071);
22
+ --color-fd-accent: oklch(0.97 0.001 106.424);
23
+ --color-fd-accent-foreground: oklch(0.216 0.006 56.043);
24
+ --color-fd-border: oklch(0.923 0.003 48.717);
25
+ --color-fd-ring: oklch(0.709 0.01 56.259);
26
+ }
27
+
28
+ /* ─── Color Tokens (dark) ────────────────────────────────────────── */
29
+
30
+ .dark {
31
+ --color-fd-background: hsl(0 0% 2%);
32
+ --color-fd-foreground: oklch(0.985 0.001 106.423);
33
+ --color-fd-card: hsl(0 0% 4%);
34
+ --color-fd-card-foreground: oklch(0.985 0.001 106.423);
35
+ --color-fd-popover: hsl(0 0% 4%);
36
+ --color-fd-popover-foreground: oklch(0.985 0.001 106.423);
37
+ --color-fd-primary: oklch(0.985 0.001 106.423);
38
+ --color-fd-primary-foreground: oklch(0.216 0.006 56.043);
39
+ --color-fd-secondary: hsl(0 0% 8%);
40
+ --color-fd-secondary-foreground: oklch(0.985 0.001 106.423);
41
+ --color-fd-muted: hsl(0 0% 10%);
42
+ --color-fd-muted-foreground: hsl(0 0% 55%);
43
+ --color-fd-accent: hsl(0 0% 10%);
44
+ --color-fd-accent-foreground: oklch(0.985 0.001 106.423);
45
+ --color-fd-border: hsl(0 0% 15%);
46
+ --color-fd-ring: hsl(0 0% 30%);
47
+ }
48
+
49
+ /* ─── Sharp corners everywhere (both modes) ──────────────────────── */
50
+
51
+ .fd-sidebar-search-btn,
52
+ .fd-search-dialog,
53
+ .fd-search-overlay .fd-search-dialog,
54
+ .fd-search-result,
55
+ .fd-codeblock,
56
+ .fd-codeblock pre,
57
+ .fd-codeblock-title,
58
+ .fd-tabs,
59
+ .fd-tab-trigger,
60
+ .fd-tab-panel,
61
+ .fd-callout,
62
+ .fd-page-nav-card,
63
+ .fd-table-wrapper,
64
+ .fd-copy-btn,
65
+ .fd-sidebar-search-btn kbd,
66
+ .fd-sidebar-collapse-btn,
67
+ .fd-theme-toggle {
68
+ border-radius: 0 !important;
69
+ }
70
+
71
+ /* ─── Sidebar (pixel-border style — BOTH light and dark) ─────────── */
72
+
73
+ /* Full-width border separators between top-level items */
74
+ .fd-sidebar-top-link,
75
+ .fd-sidebar-nav > .fd-sidebar-folder {
76
+ border-top: 1px solid var(--color-fd-border);
77
+ margin-left: -12px;
78
+ margin-right: -12px;
79
+ padding-left: 12px;
80
+ padding-right: 12px;
81
+ }
82
+
83
+ .fd-sidebar-folder-content::before {
84
+ content: '';
85
+ position: absolute;
86
+ left: 4px;
87
+ top: 4px;
88
+ bottom: 4px;
89
+ width: 1px;
90
+ background: var(--color-fd-border);
91
+ }
92
+
93
+ .fd-sidebar-top-link.fd-sidebar-first-item,
94
+ .fd-sidebar-folder.fd-sidebar-first-item {
95
+ border-top: none;
96
+ }
97
+ .fd-sidebar-folder-content::before {
98
+ content: '';
99
+ position: absolute;
100
+ left: -4px;
101
+ top: 3px;
102
+ bottom: 0px;
103
+ width: 1px;
104
+ height: calc(100% + 0.01px);
105
+ background: var(--color-fd-border);
106
+ }
107
+
108
+ /* Folder trigger — extend to full sidebar width */
109
+ .fd-sidebar-nav > .fd-sidebar-folder > .fd-sidebar-folder-trigger {
110
+ margin-left: -12px;
111
+ margin-right: -12px;
112
+ padding-left: 12px;
113
+ padding-right: 12px;
114
+ }
115
+
116
+ /* All sidebar links — sharp corners, transparent bg */
117
+ .fd-sidebar-link {
118
+ font-size: 0.875rem;
119
+ line-height: 1.6;
120
+ border-radius: 0 !important;
121
+ padding: 0.5rem 0.625rem;
122
+ font-weight: 400;
123
+ background-color: transparent !important;
124
+ transition: color 0.15s ease;
125
+ color: var(--color-fd-muted-foreground);
126
+ }
127
+
128
+ .fd-sidebar-link:hover {
129
+ background: transparent !important;
130
+ background-color: transparent !important;
131
+ color: var(--color-fd-foreground);
132
+ }
133
+
134
+ .fd-sidebar-link-active,
135
+ .fd-sidebar-link[data-active="true"] {
136
+ color: var(--color-fd-foreground) !important;
137
+ font-weight: 600;
138
+ background: transparent !important;
139
+ background-color: transparent !important;
140
+ }
141
+
142
+ .fd-sidebar-link-active:hover,
143
+ .fd-sidebar-link[data-active="true"]:hover {
144
+ background: transparent !important;
145
+ background-color: transparent !important;
146
+ }
147
+
148
+ /* Folder triggers — sharp corners, transparent bg */
149
+ .fd-sidebar-folder-trigger {
150
+ font-size: 0.875rem;
151
+ font-weight: 500;
152
+ border-radius: 0 !important;
153
+ }
154
+
155
+ .fd-sidebar-folder-trigger:hover {
156
+ background: transparent !important;
157
+ }
158
+
159
+ /* Child links — smaller, inside folder content */
160
+ .fd-sidebar-child-link {
161
+ font-size: 0.785rem !important;
162
+ padding-top: 0.25rem !important;
163
+ padding-bottom: 0.25rem !important;
164
+ }
165
+
166
+ .fd-sidebar-child-link.fd-sidebar-link-active {
167
+ font-weight: 600 !important;
168
+ }
169
+
170
+ /* Dark mode — specific color overrides */
171
+ .dark .fd-sidebar {
172
+ background: hsl(0 0% 2%);
173
+ border-color: hsl(0 0% 12%);
174
+ }
175
+
176
+ .dark .fd-sidebar-link {
177
+ color: hsl(0 0% 50%);
178
+ }
179
+
180
+ .dark .fd-sidebar-link:hover {
181
+ color: hsl(0 0% 80%);
182
+ }
183
+
184
+ .dark .fd-sidebar-folder-trigger {
185
+ color: hsl(0 0% 90%);
186
+ }
187
+
188
+ .dark .fd-sidebar-folder-trigger:hover {
189
+ color: hsl(0 0% 100%);
190
+ }
191
+
192
+ .dark .fd-sidebar-link-active,
193
+ .dark .fd-sidebar-link[data-active="true"] {
194
+ color: var(--color-fd-primary, hsl(0 0% 95%)) !important;
195
+ }
196
+
197
+ .dark .fd-sidebar-child-link {
198
+ color: hsl(0 0% 45%) !important;
199
+ }
200
+
201
+ .dark .fd-sidebar-child-link:hover {
202
+ color: hsl(0 0% 75%) !important;
203
+ }
204
+
205
+ .dark .fd-sidebar-child-link.fd-sidebar-link-active {
206
+ color: var(--color-fd-primary, hsl(0 0% 95%)) !important;
207
+ }
208
+
209
+ /* Active indicator bar for child links */
210
+ .fd-sidebar-folder-content .fd-sidebar-link-active::before {
211
+ content: '';
212
+ position: absolute;
213
+ left: -16px;
214
+ top: 25%;
215
+ bottom: 25%;
216
+ width: 2px;
217
+ background: var(--color-fd-foreground);
218
+ border-radius: 0;
219
+ }
220
+
221
+ .dark .fd-sidebar-folder-content .fd-sidebar-link-active::before {
222
+ background: var(--color-fd-primary, hsl(0 0% 95%));
223
+ }
224
+
225
+ /* Sidebar icon */
226
+ .fd-sidebar-icon {
227
+ display: inline-flex;
228
+ align-items: center;
229
+ flex-shrink: 0;
230
+ opacity: 0.7;
231
+ }
232
+
233
+ .fd-sidebar-link-active .fd-sidebar-icon {
234
+ opacity: 1;
235
+ }
236
+
237
+ /* Sidebar search button — full-width, border-y */
238
+ .fd-sidebar-search-btn {
239
+ background: transparent !important;
240
+ border: none !important;
241
+ border-top: 1px solid var(--color-fd-border) !important;
242
+ border-bottom: 1px solid var(--color-fd-border) !important;
243
+ border-radius: 0 !important;
244
+
245
+ }
246
+
247
+ .fd-sidebar-search {
248
+ padding: 0;
249
+ margin-left: -12px;
250
+ margin-right: -12px;
251
+ padding-left: 12px;
252
+ padding-right: 12px;
253
+ }
254
+
255
+ .fd-sidebar-search .fd-sidebar-search-btn {
256
+ width: 100%;
257
+ padding-left: 12px;
258
+ padding-right: 12px;
259
+ margin: 0;
260
+ }
261
+
262
+ .fd-sidebar-search-btn:hover {
263
+ background: var(--color-fd-accent) !important;
264
+ }
265
+
266
+ .dark .fd-sidebar-search-btn {
267
+ color: hsl(0 0% 45%);
268
+ }
269
+
270
+ .dark .fd-sidebar-search-btn:hover {
271
+ background: hsl(0 0% 4%) !important;
272
+ color: hsl(0 0% 65%);
273
+ }
274
+
275
+ /* ─── Tables ─────────────────────────────────────────────────────── */
276
+
277
+ .fd-table-wrapper {
278
+ border-radius: 0 !important;
279
+ }
280
+
281
+ .dark .fd-table-wrapper {
282
+ border-color: hsl(0 0% 15%);
283
+ }
284
+
285
+ .dark .fd-page-body table th {
286
+ background: hsl(0 0% 6%);
287
+ color: hsl(0 0% 80%);
288
+ font-weight: 500;
289
+ border-color: hsl(0 0% 15%);
290
+ }
291
+
292
+ .dark .fd-page-body table td {
293
+ border-color: hsl(0 0% 12%);
294
+ }
295
+
296
+ /* ─── Code blocks ────────────────────────────────────────────────── */
297
+
298
+ .fd-codeblock {
299
+ border: 1px solid var(--color-fd-border);
300
+ border-radius: 0 !important;
301
+ box-shadow: none;
302
+ }
303
+
304
+ .fd-codeblock pre.shiki {
305
+ border-radius: 0 !important;
306
+ }
307
+
308
+ .fd-codeblock-title {
309
+ border-bottom-color: var(--color-fd-border);
310
+ }
311
+
312
+ .fd-codeblock-title .fd-copy-btn {
313
+ border-radius: 0 !important;
314
+ }
315
+
316
+ .fd-copy-btn {
317
+ border-radius: 0 !important;
318
+ }
319
+
320
+ /* ─── Tabs ───────────────────────────────────────────────────────── */
321
+
322
+ .fd-tabs {
323
+ border-radius: 0 !important;
324
+ box-shadow: none;
325
+ }
326
+
327
+ /* ─── Callouts ───────────────────────────────────────────────────── */
328
+
329
+ .fd-callout {
330
+ border-radius: 0 !important;
331
+ }
332
+
333
+ /* ─── Prev/Next nav cards ────────────────────────────────────────── */
334
+
335
+ .fd-page-nav-card {
336
+ border-radius: 0 !important;
337
+ }
338
+
339
+ .dark .fd-page-nav-card {
340
+ border-color: hsl(0 0% 15%);
341
+ }
342
+
343
+ .dark .fd-page-nav-card:hover {
344
+ background: hsl(0 0% 6%);
345
+ border-color: hsl(0 0% 22%);
346
+ }
347
+
348
+ /* ─── Search dialog ──────────────────────────────────────────────── */
349
+
350
+ .fd-search-overlay .fd-search-dialog {
351
+ border-radius: 0;
352
+ }
353
+
354
+ /* ─── Breadcrumb (monospace, uppercase) ───────────────────────────── */
355
+
356
+ .fd-breadcrumb {
357
+ font-size: 0.75rem;
358
+ letter-spacing: 0.01em;
359
+ }
360
+
361
+ .fd-breadcrumb-parent,
362
+ .fd-breadcrumb-current {
363
+ font-family: ui-monospace, monospace;
364
+ text-transform: uppercase;
365
+ }
366
+
367
+ /* ─── Selection ──────────────────────────────────────────────────── */
368
+
369
+ ::selection {
370
+ background: var(--color-fd-foreground);
371
+ color: var(--color-fd-background);
372
+ }
373
+
374
+ /* ─── Scrollbar ──────────────────────────────────────────────────── */
375
+
376
+ * {
377
+ scrollbar-width: thin;
378
+ scrollbar-color: var(--color-fd-border) transparent;
379
+ }
380
+
381
+ /* ─── HR ─────────────────────────────────────────────────────────── */
382
+
383
+ .dark hr {
384
+ border-color: hsl(0 0% 15%);
385
+ }
386
+
387
+ /* ─── AI Chat (pixel-border — zero radius, pixel-art, monospace) ── */
388
+
389
+ .fd-ai-dialog {
390
+ border-radius: 0 !important;
391
+ border-width: 1px;
392
+ box-shadow: 4px 4px 0 0 var(--color-fd-border, hsl(0 0% 15%));
393
+ }
394
+
395
+ .fd-ai-tab-bar {
396
+ gap: 0;
397
+ }
398
+
399
+ .fd-ai-tab {
400
+ border-radius: 0 !important;
401
+ font-size: 12px;
402
+ letter-spacing: 0.04em;
403
+ }
404
+
405
+ .fd-ai-header-title {
406
+ font-size: 13px;
407
+ }
408
+
409
+ .fd-ai-bubble-user {
410
+ border-radius: 0 !important;
411
+ font-size: 12px;
412
+ }
413
+
414
+ .fd-ai-bubble-ai {
415
+ border-radius: 0 !important;
416
+ font-size: 12px;
417
+ }
418
+
419
+ .fd-ai-bubble-ai pre {
420
+ border-radius: 0 !important;
421
+ border: 1px solid var(--color-fd-border, hsl(0 0% 15%));
422
+ }
423
+
424
+ .fd-ai-bubble-ai code {
425
+ border-radius: 0 !important;
426
+ }
427
+
428
+ .fd-ai-input-wrap {
429
+ border-radius: 0 !important;
430
+ }
431
+
432
+ .fd-ai-input {
433
+ font-size: 13px;
434
+ }
435
+
436
+ .fd-ai-send-btn {
437
+ border-radius: 0 !important;
438
+ }
439
+
440
+ .fd-ai-close-btn {
441
+ border-radius: 0 !important;
442
+ }
443
+
444
+ .fd-ai-floating-btn {
445
+ border-radius: 0 !important;
446
+ box-shadow: 3px 3px 0 0 var(--color-fd-border, hsl(0 0% 15%));
447
+ }
448
+
449
+ .fd-ai-floating-btn:hover {
450
+ transform: translate(-1px, -1px);
451
+ box-shadow: 4px 4px 0 0 var(--color-fd-border, hsl(0 0% 15%));
452
+ }
453
+
454
+ .fd-ai-suggestion {
455
+ border-radius: 0 !important;
456
+ font-size: 12px;
457
+ }
458
+
459
+ .fd-ai-result {
460
+ border-radius: 0 !important;
461
+ }
462
+
463
+ .fd-ai-esc {
464
+ border-radius: 0 !important;
465
+ }
466
+
467
+ .fd-ai-clear-btn {
468
+ border-radius: 0 !important;
469
+ letter-spacing: 0.04em;
470
+ }
471
+
472
+ .fd-ai-msg-label {
473
+ letter-spacing: 0.06em;
474
+ }
475
+
476
+ .fd-ai-loading-text {
477
+ text-transform: uppercase;
478
+ letter-spacing: 0.04em;
479
+ font-size: 11px;
480
+ }
481
+
482
+ .fd-ai-loading-dot {
483
+ border-radius: 0;
484
+ width: 4px;
485
+ height: 4px;
486
+ }
487
+
488
+ /* ─── Full-Modal (pixel-border) ──────────────────────────────────── */
489
+
490
+ .fd-ai-fm-input-container {
491
+ border-radius: 0 !important;
492
+ box-shadow: 4px 4px 0 0 var(--color-fd-border, hsl(0 0% 15%));
493
+ }
494
+
495
+ .fd-ai-fm-send-btn {
496
+ border-radius: 0 !important;
497
+ }
498
+
499
+ .fd-ai-fm-close-btn {
500
+ border-radius: 0 !important;
501
+ }
502
+
503
+ .fd-ai-fm-input {
504
+ font-size: 13px;
505
+ }
506
+
507
+ .fd-ai-fm-suggestion {
508
+ border-radius: 0 !important;
509
+ font-family: var(--fd-font-mono, ui-monospace, monospace);
510
+ font-size: 11px;
511
+ text-transform: uppercase;
512
+ letter-spacing: 0.04em;
513
+ }
514
+
515
+ .fd-ai-fm-trigger-btn {
516
+ border-radius: 0 !important;
517
+ font-family: var(--fd-font-mono, ui-monospace, monospace);
518
+ text-transform: uppercase;
519
+ letter-spacing: 0.04em;
520
+ font-size: 12px;
521
+ box-shadow: 3px 3px 0 0 var(--color-fd-border, hsl(0 0% 15%));
522
+ }
523
+
524
+ .fd-ai-fm-trigger-btn:hover {
525
+ transform: translate(-1px, -1px);
526
+ box-shadow: 4px 4px 0 0 var(--color-fd-border, hsl(0 0% 15%));
527
+ }
528
+
529
+ .fd-ai-fm-msg-label {
530
+ font-family: var(--fd-font-mono, ui-monospace, monospace);
531
+ text-transform: uppercase;
532
+ letter-spacing: 0.06em;
533
+ font-size: 11px;
534
+ }
535
+
536
+ .fd-ai-fm-msg-content {
537
+ font-size: 13px;
538
+ }
539
+
540
+ .fd-ai-fm-msg-content code {
541
+ border-radius: 0 !important;
542
+ }
543
+
544
+ .fd-ai-fm-suggestions-label {
545
+ font-family: var(--fd-font-mono, ui-monospace, monospace);
546
+ text-transform: uppercase;
547
+ letter-spacing: 0.04em;
548
+ }
549
+
550
+ .fd-ai-fm-clear-btn {
551
+ font-family: var(--fd-font-mono, ui-monospace, monospace);
552
+ text-transform: uppercase;
553
+ letter-spacing: 0.04em;
554
+ }
555
+
556
+ .fd-ai-fm-footer-hint {
557
+ font-size: 11px;
558
+ }
559
+
560
+ .fd-ai-fm-thinking-dot {
561
+ border-radius: 0;
562
+ width: 5px;
563
+ height: 5px;
564
+ }
565
+
566
+ /* ─── Code blocks in AI chat (pixel-border) ──────────────────────── */
567
+
568
+ .fd-ai-code-block {
569
+ border-radius: 0 !important;
570
+ box-shadow: 3px 3px 0 0 var(--color-fd-border, hsl(0 0% 15%));
571
+ background: transparent;
572
+ --sh-class: #66d9ef;
573
+ --sh-identifier: #f8f8f2;
574
+ --sh-keyword: #f92672;
575
+ --sh-string: #e6db74;
576
+ --sh-property: #a6e22e;
577
+ --sh-entity: #66d9ef;
578
+ --sh-sign: #f8f8f2;
579
+ --sh-comment: #75715e;
580
+ --sh-jsxliterals: #ae81ff;
581
+ }
582
+
583
+ .fd-ai-code-header {
584
+ border-bottom-color: var(--color-fd-border, hsl(0 0% 15%));
585
+ background: transparent;
586
+ }
587
+
588
+ .fd-ai-code-lang {
589
+ font-family: var(--fd-font-mono, ui-monospace, monospace);
590
+ }
591
+
592
+ .fd-ai-code-copy {
593
+ border-radius: 0 !important;
594
+ font-family: var(--fd-font-mono, ui-monospace, monospace);
595
+ text-transform: uppercase;
596
+ letter-spacing: 0.04em;
597
+ }
598
+
599
+ .fd-ai-code-block code {
600
+ font-family: var(--fd-font-mono, ui-monospace, monospace);
601
+ }