cosmos-docusaurus-theme 1.1.7 → 1.2.0

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ---
9
9
 
10
+ ## [1.2.0] — 2026-03-10
11
+
12
+ ### Changed — Rackscope design system alignment
13
+
14
+ 6 axes inspired by the `templates/default` component library:
15
+
16
+ - **Border radius**: Cards `16px` (rounded-2xl), code `12px`, inline code `6px`, pagination `12px`
17
+ - **Admonitions**: AlertBanner style — `rounded-2xl`, all-around border at semantic opacity, `padding: 16px 20px`
18
+ - **Dark shadows**: shadow-card pattern on cards + code blocks (heavier on dark surfaces)
19
+ - **Details/summary**: SectionCard style — `rounded-2xl`, chevron that rotates, dark bg-gray-900
20
+ - **TOC active**: bg pill `rgb(70,95,255,0.08)` + border-radius + padding (mirrors sidebar active)
21
+ - **Sidebar labels**: `10px` + `letter-spacing: 0.12em` — exact Rackscope LayoutLabel
22
+ - **Typography**: `h1 font-weight: 800`, tight letter-spacing (`-0.04em` → `-0.01em`)
23
+ - **Scrollbar**: `4px` (was 5px) — matches Rackscope index.css
24
+
10
25
  ## [1.1.6] — 2026-03-10
11
26
 
12
27
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosmos-docusaurus-theme",
3
- "version": "1.1.7",
3
+ "version": "1.2.0",
4
4
  "description": "A clean, dark-first Docusaurus CSS theme based on TailAdmin design system with Outfit typography",
5
5
  "keywords": [
6
6
  "docusaurus",
package/src/css/theme.css CHANGED
@@ -325,50 +325,71 @@ button[aria-label*="dark and light mode"]:hover::before {
325
325
  background: rgb(255,255,255,0.05);
326
326
  }
327
327
 
328
- /* Sidebar section separator — uppercase label */
328
+ /* Sidebar section separator — exact Rackscope LayoutLabel pattern */
329
329
  .sidebar_menu_section_title {
330
- font-size: 0.6875rem;
330
+ font-size: 0.625rem; /* 10px — matches text-[10px] */
331
331
  font-weight: 700;
332
- letter-spacing: 0.08em;
332
+ letter-spacing: 0.12em; /* tracking-wider */
333
333
  text-transform: uppercase;
334
- color: #a3a3a3; /* neutral gray-400 */
334
+ color: #a3a3a3;
335
335
  padding: 12px 12px 4px;
336
336
  }
337
337
 
338
338
  /* ── Code blocks ─────────────────────────────────────────────────────────── */
339
339
  .prism-code {
340
- border-radius: 10px;
340
+ border-radius: 12px; /* rounded-xl — matches Rackscope input/button radius */
341
341
  font-size: 0.8625rem;
342
342
  line-height: 1.65;
343
343
  }
344
344
 
345
- /* Inline code — subtle bordered style */
345
+ [data-theme='dark'] .prism-code {
346
+ /* Heavier shadow in dark — matches Rackscope shadow-card pattern */
347
+ box-shadow: 0 1px 3px rgb(0, 0, 0, 0.4), 0 1px 2px rgb(0, 0, 0, 0.3);
348
+ }
349
+
350
+ /* Code block title bar */
351
+ .codeBlockTitle_Ktv7 {
352
+ border-radius: 12px 12px 0 0;
353
+ }
354
+
355
+ /* Inline code — rounded-md, subtle bordered style */
346
356
  code {
347
- border-radius: 5px;
348
- padding: 2px 6px;
357
+ border-radius: 6px;
358
+ padding: 2px 7px;
349
359
  font-size: 0.875em;
350
360
  border: 1px solid var(--ifm-toc-border-color);
351
361
  background: var(--ifm-code-background);
352
362
  }
353
363
 
354
- /* ── Content headings ─────────────────────────────────────────────────────── */
355
- .markdown h1,
356
- .markdown h2,
357
- .markdown h3,
358
- .markdown h4 {
359
- font-weight: 700;
360
- letter-spacing: -0.3px;
364
+ /* ── Content headings tight letter-spacing (Rackscope -0.03em / -0.04em) ── */
365
+ .markdown h1 {
366
+ font-weight: 800;
367
+ letter-spacing: -0.04em;
368
+ font-size: 2.2rem;
361
369
  }
362
370
 
363
- .markdown h1 { font-size: 2.2rem; }
364
-
365
371
  .markdown h2 {
372
+ font-weight: 700;
373
+ letter-spacing: -0.03em;
366
374
  font-size: 1.6rem;
367
375
  padding-bottom: 8px;
368
376
  border-bottom: 1px solid var(--ifm-toc-border-color);
369
377
  margin-top: 2.5rem;
370
378
  }
371
379
 
380
+ .markdown h3 {
381
+ font-weight: 700;
382
+ letter-spacing: -0.02em;
383
+ font-size: 1.25rem;
384
+ }
385
+
386
+ .markdown h4,
387
+ .markdown h5,
388
+ .markdown h6 {
389
+ font-weight: 600;
390
+ letter-spacing: -0.01em;
391
+ }
392
+
372
393
  /* ── Tables — direct overrides (CSS variables not reliably cascaded) ─────── */
373
394
 
374
395
  /* Dark mode: Void gray-800 borders, gray-900 header */
@@ -474,49 +495,147 @@ button[aria-label*="dark and light mode"]:hover {
474
495
  .table-of-contents__link {
475
496
  font-size: 0.8125rem;
476
497
  color: var(--ifm-font-color-secondary);
477
- transition: color 0.12s;
498
+ transition: color 0.12s, background 0.12s;
499
+ border-radius: 6px;
500
+ padding: 2px 6px;
501
+ margin-left: -6px;
502
+ display: block;
478
503
  }
479
504
 
480
- .table-of-contents__link:hover,
505
+ .table-of-contents__link:hover {
506
+ color: var(--ifm-color-primary);
507
+ background: rgb(70, 95, 255, 0.06);
508
+ }
509
+
510
+ /* Active TOC link — bg pill like sidebar active item */
481
511
  .table-of-contents__link--active {
482
512
  color: var(--ifm-color-primary);
483
- font-weight: 500;
513
+ font-weight: 600;
514
+ background: rgb(70, 95, 255, 0.08);
515
+ }
516
+
517
+ [data-theme='dark'] .table-of-contents__link:hover {
518
+ background: rgb(117, 146, 255, 0.08);
519
+ }
520
+
521
+ [data-theme='dark'] .table-of-contents__link--active {
522
+ background: rgb(117, 146, 255, 0.1);
523
+ }
524
+
525
+ /* ── Details / Summary — SectionCard style ───────────────────────────────── */
526
+ /* Matches Rackscope: rounded-2xl border border-gray-200 bg-white p-6
527
+ dark:border-gray-800 dark:bg-gray-900 */
528
+ details {
529
+ border: 1px solid var(--ifm-toc-border-color);
530
+ border-radius: 16px; /* rounded-2xl */
531
+ background: var(--ifm-background-surface-color);
532
+ margin-bottom: 1rem;
533
+ overflow: hidden;
534
+ transition: border-color 0.15s;
484
535
  }
485
536
 
486
- /* ── Admonitions — TailAdmin semantic color palette ──────────────────────── */
537
+ [data-theme='dark'] details {
538
+ background: #111827;
539
+ border-color: #1f2937;
540
+ box-shadow: 0 1px 3px rgb(0, 0, 0, 0.4), 0 1px 2px rgb(0, 0, 0, 0.3);
541
+ }
542
+
543
+ details > summary {
544
+ padding: 14px 20px;
545
+ cursor: pointer;
546
+ font-weight: 600;
547
+ font-size: 0.9375rem;
548
+ color: var(--ifm-font-color-base);
549
+ list-style: none;
550
+ display: flex;
551
+ align-items: center;
552
+ gap: 8px;
553
+ transition: background 0.12s;
554
+ }
555
+
556
+ details > summary:hover {
557
+ background: rgb(70, 95, 255, 0.04);
558
+ }
559
+
560
+ [data-theme='dark'] details > summary:hover {
561
+ background: rgb(255, 255, 255, 0.04);
562
+ }
563
+
564
+ details > summary::before {
565
+ content: '›';
566
+ font-size: 1.125rem;
567
+ color: var(--ifm-color-primary);
568
+ transition: transform 0.2s;
569
+ display: inline-block;
570
+ line-height: 1;
571
+ }
572
+
573
+ details[open] > summary::before {
574
+ transform: rotate(90deg);
575
+ }
576
+
577
+ details > :not(summary) {
578
+ padding: 0 20px 16px;
579
+ border-top: 1px solid var(--ifm-toc-border-color);
580
+ margin-top: 0;
581
+ }
582
+
583
+ [data-theme='dark'] details > :not(summary) {
584
+ border-top-color: #1f2937;
585
+ }
586
+
587
+ /* ── Admonitions — AlertBanner style (Rackscope rounded-2xl full border) ─── */
588
+ /* Full all-around border with semantic opacity — matches Rackscope AlertBanner:
589
+ rounded-2xl border px-5 py-3.5 (border + bg at semantic opacity) */
590
+ .alert {
591
+ border-radius: 16px; /* rounded-2xl */
592
+ border-left-width: 3px; /* keep accent left stripe */
593
+ padding: 16px 20px;
594
+ }
595
+
596
+ /* Light mode — 5% opacity bg, 25% opacity border */
487
597
  .alert--info {
598
+ border-color: rgb(70, 95, 255, 0.25);
488
599
  border-left-color: #465fff;
489
600
  background: rgb(70, 95, 255, 0.05);
490
601
  }
491
602
 
492
603
  .alert--success {
604
+ border-color: rgb(18, 183, 106, 0.25);
493
605
  border-left-color: #12b76a;
494
606
  background: rgb(18, 183, 106, 0.05);
495
607
  }
496
608
 
497
609
  .alert--warning {
610
+ border-color: rgb(247, 144, 9, 0.25);
498
611
  border-left-color: #f79009;
499
612
  background: rgb(247, 144, 9, 0.05);
500
613
  }
501
614
 
502
615
  .alert--danger {
616
+ border-color: rgb(240, 68, 56, 0.25);
503
617
  border-left-color: #f04438;
504
618
  background: rgb(240, 68, 56, 0.05);
505
619
  }
506
620
 
621
+ /* Dark mode — 8% opacity bg, 20% opacity border (subtle on dark surface) */
507
622
  [data-theme='dark'] .alert--info {
623
+ border-color: rgb(70, 95, 255, 0.2);
508
624
  background: rgb(70, 95, 255, 0.08);
509
625
  }
510
626
 
511
627
  [data-theme='dark'] .alert--success {
628
+ border-color: rgb(18, 183, 106, 0.2);
512
629
  background: rgb(18, 183, 106, 0.08);
513
630
  }
514
631
 
515
632
  [data-theme='dark'] .alert--warning {
633
+ border-color: rgb(247, 144, 9, 0.2);
516
634
  background: rgb(247, 144, 9, 0.08);
517
635
  }
518
636
 
519
637
  [data-theme='dark'] .alert--danger {
638
+ border-color: rgb(240, 68, 56, 0.2);
520
639
  background: rgb(240, 68, 56, 0.08);
521
640
  }
522
641
 
@@ -561,7 +680,7 @@ button[aria-label*="dark and light mode"]:hover {
561
680
  /* ── Pagination nav ───────────────────────────────────────────────────────── */
562
681
  .pagination-nav__link {
563
682
  border-color: var(--ifm-toc-border-color);
564
- border-radius: 10px;
683
+ border-radius: 12px; /* rounded-xl — matches Rackscope button radius */
565
684
  transition: border-color 0.15s, box-shadow 0.15s;
566
685
  }
567
686
 
@@ -570,6 +689,10 @@ button[aria-label*="dark and light mode"]:hover {
570
689
  box-shadow: 0 0 0 3px rgb(70, 95, 255, 0.12);
571
690
  }
572
691
 
692
+ [data-theme='dark'] .pagination-nav__link:hover {
693
+ box-shadow: 0 4px 12px rgb(0, 0, 0, 0.3), 0 0 0 2px rgb(117, 146, 255, 0.2);
694
+ }
695
+
573
696
  /* ── Progress bar (page loading indicator) ───────────────────────────────── */
574
697
  :root {
575
698
  --docusaurus-progress-bar-color: #465fff;
@@ -652,7 +775,7 @@ button[aria-label*="dark and light mode"]:hover {
652
775
  /* ── Cards ───────────────────────────────────────────────────────────────── */
653
776
  :root {
654
777
  --ifm-card-background-color: #fff;
655
- --ifm-card-border-radius: 12px;
778
+ --ifm-card-border-radius: 16px; /* rounded-2xl — matches Rackscope SectionCard */
656
779
  }
657
780
 
658
781
  [data-theme='dark'] {
@@ -666,11 +789,20 @@ button[aria-label*="dark and light mode"]:hover {
666
789
  transition: border-color 0.15s, box-shadow 0.15s;
667
790
  }
668
791
 
792
+ /* Dark mode: heavier shadow — matches Rackscope shadow-card pattern */
793
+ [data-theme='dark'] .card {
794
+ box-shadow: 0 1px 3px rgb(0, 0, 0, 0.4), 0 1px 2px rgb(0, 0, 0, 0.3);
795
+ }
796
+
669
797
  .card:hover {
670
798
  border-color: var(--ifm-color-primary);
671
799
  box-shadow: var(--ifm-global-shadow-md);
672
800
  }
673
801
 
802
+ [data-theme='dark'] .card:hover {
803
+ box-shadow: 0 10px 25px rgb(0, 0, 0, 0.5), 0 4px 6px rgb(0, 0, 0, 0.2);
804
+ }
805
+
674
806
  /* ── Tags ────────────────────────────────────────────────────────────────── */
675
807
  :root {
676
808
  --ifm-tag-background: rgb(70, 95, 255, 0.08);
@@ -749,10 +881,10 @@ button[aria-label*="dark and light mode"]:hover {
749
881
  --docsearch-logo-color: #7592ff;
750
882
  }
751
883
 
752
- /* ── Scrollbar — thin, TailAdmin style ───────────────────────────────────── */
884
+ /* ── Scrollbar — 4px, matches Rackscope index.css ───────────────────────── */
753
885
  ::-webkit-scrollbar {
754
- width: 5px;
755
- height: 5px;
886
+ width: 4px;
887
+ height: 4px;
756
888
  }
757
889
 
758
890
  ::-webkit-scrollbar-track {