rdoc 7.2.0 → 8.0.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.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +3 -4
  3. data/LICENSE.rdoc +4 -0
  4. data/README.md +43 -2
  5. data/doc/markup_reference/markdown.md +104 -3
  6. data/lib/rdoc/code_object/alias.rb +2 -8
  7. data/lib/rdoc/code_object/any_method.rb +11 -6
  8. data/lib/rdoc/code_object/attr.rb +11 -6
  9. data/lib/rdoc/code_object/class_module.rb +62 -32
  10. data/lib/rdoc/code_object/constant.rb +29 -3
  11. data/lib/rdoc/code_object/context/section.rb +4 -35
  12. data/lib/rdoc/code_object/context.rb +39 -34
  13. data/lib/rdoc/code_object/method_attr.rb +9 -15
  14. data/lib/rdoc/code_object/mixin.rb +2 -2
  15. data/lib/rdoc/code_object/top_level.rb +9 -3
  16. data/lib/rdoc/code_object.rb +2 -4
  17. data/lib/rdoc/comment.rb +0 -65
  18. data/lib/rdoc/cross_reference.rb +7 -27
  19. data/lib/rdoc/encoding.rb +3 -3
  20. data/lib/rdoc/generator/aliki.rb +17 -0
  21. data/lib/rdoc/generator/darkfish.rb +12 -6
  22. data/lib/rdoc/generator/json_index.rb +2 -2
  23. data/lib/rdoc/generator/markup.rb +56 -31
  24. data/lib/rdoc/generator/template/aliki/DESIGN.md +536 -0
  25. data/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +1 -1
  26. data/lib/rdoc/generator/template/aliki/_head.rhtml +1 -1
  27. data/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +8 -6
  28. data/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +8 -6
  29. data/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +1 -1
  30. data/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +2 -2
  31. data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +1 -1
  32. data/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +1 -1
  33. data/lib/rdoc/generator/template/aliki/class.rhtml +56 -46
  34. data/lib/rdoc/generator/template/aliki/css/rdoc.css +337 -111
  35. data/lib/rdoc/generator/template/aliki/index.rhtml +1 -1
  36. data/lib/rdoc/generator/template/aliki/js/aliki.js +20 -18
  37. data/lib/rdoc/generator/template/aliki/page.rhtml +1 -1
  38. data/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +1 -1
  39. data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +2 -2
  40. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +8 -6
  41. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +8 -6
  42. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +1 -1
  43. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +1 -1
  44. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +1 -1
  45. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +5 -5
  46. data/lib/rdoc/generator/template/darkfish/class.rhtml +18 -21
  47. data/lib/rdoc/generator/template/darkfish/css/rdoc.css +0 -1
  48. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +3 -3
  49. data/lib/rdoc/i18n/text.rb +3 -3
  50. data/lib/rdoc/markdown.kpeg +15 -10
  51. data/lib/rdoc/markdown.rb +289 -104
  52. data/lib/rdoc/markup/document.rb +2 -2
  53. data/lib/rdoc/markup/formatter.rb +24 -34
  54. data/lib/rdoc/markup/heading.rb +1 -4
  55. data/lib/rdoc/markup/indented_paragraph.rb +1 -1
  56. data/lib/rdoc/markup/list.rb +2 -2
  57. data/lib/rdoc/markup/list_item.rb +2 -2
  58. data/lib/rdoc/markup/pre_process.rb +0 -25
  59. data/lib/rdoc/markup/to_ansi.rb +1 -1
  60. data/lib/rdoc/markup/to_bs.rb +1 -1
  61. data/lib/rdoc/markup/to_html.rb +131 -53
  62. data/lib/rdoc/markup/to_html_crossref.rb +97 -71
  63. data/lib/rdoc/markup/to_html_snippet.rb +5 -5
  64. data/lib/rdoc/markup/to_joined_paragraph.rb +0 -5
  65. data/lib/rdoc/markup/to_label.rb +2 -2
  66. data/lib/rdoc/markup/to_markdown.rb +1 -1
  67. data/lib/rdoc/markup/to_rdoc.rb +2 -2
  68. data/lib/rdoc/markup/to_table_of_contents.rb +1 -1
  69. data/lib/rdoc/markup/to_tt_only.rb +0 -7
  70. data/lib/rdoc/markup/verbatim.rb +1 -1
  71. data/lib/rdoc/options.rb +36 -51
  72. data/lib/rdoc/parser/c.rb +7 -6
  73. data/lib/rdoc/parser/rbs.rb +275 -0
  74. data/lib/rdoc/parser/ruby.rb +954 -2066
  75. data/lib/rdoc/parser/ruby_colorizer.rb +253 -0
  76. data/lib/rdoc/parser.rb +3 -2
  77. data/lib/rdoc/rbs_helper.rb +186 -0
  78. data/lib/rdoc/rdoc.rb +196 -24
  79. data/lib/rdoc/ri/driver.rb +8 -2
  80. data/lib/rdoc/ri/paths.rb +1 -1
  81. data/lib/rdoc/{servlet.rb → ri/servlet.rb} +5 -5
  82. data/lib/rdoc/ri.rb +4 -3
  83. data/lib/rdoc/rubygems_hook.rb +11 -11
  84. data/lib/rdoc/server.rb +460 -0
  85. data/lib/rdoc/stats.rb +147 -124
  86. data/lib/rdoc/store.rb +212 -4
  87. data/lib/rdoc/task.rb +16 -15
  88. data/lib/rdoc/text.rb +1 -118
  89. data/lib/rdoc/token_stream.rb +11 -33
  90. data/lib/rdoc/version.rb +1 -1
  91. data/lib/rdoc.rb +35 -7
  92. data/lib/rubygems_plugin.rb +2 -11
  93. data/rdoc-logo.svg +43 -0
  94. data/rdoc.gemspec +6 -4
  95. metadata +35 -18
  96. data/lib/rdoc/code_object/anon_class.rb +0 -10
  97. data/lib/rdoc/code_object/ghost_method.rb +0 -6
  98. data/lib/rdoc/code_object/meta_method.rb +0 -6
  99. data/lib/rdoc/parser/prism_ruby.rb +0 -1112
  100. data/lib/rdoc/parser/ripper_state_lex.rb +0 -302
  101. data/lib/rdoc/parser/ruby_tools.rb +0 -163
@@ -68,8 +68,11 @@
68
68
  --color-accent-primary: var(--color-primary-600);
69
69
  --color-accent-hover: var(--color-primary-700);
70
70
  --color-accent-subtle: var(--color-primary-50);
71
+ --color-title-kind-border: var(--color-primary-200);
71
72
  --color-code-bg: #f6f8fa;
72
73
  --color-code-border: var(--color-neutral-300);
74
+ --color-sig-bg: var(--color-neutral-100);
75
+ --color-sig-border: var(--color-border-default);
73
76
  --color-nav-bg: #fff;
74
77
  --color-nav-text: var(--color-neutral-700);
75
78
  --color-th-background: var(--color-neutral-100);
@@ -201,8 +204,11 @@
201
204
  --color-accent-hover: var(--color-primary-400);
202
205
  --color-accent-subtle: rgb(235 84 79 / 10%);
203
206
  --color-accent-subtle-hover: rgb(235 84 79 / 20%);
207
+ --color-title-kind-border: rgb(235 84 79 / 35%);
204
208
  --color-code-bg: var(--color-neutral-800);
205
209
  --color-code-border: var(--color-neutral-700);
210
+ --color-sig-bg: #211f1e; /* between neutral-900 and neutral-800 */
211
+ --color-sig-border: var(--color-border-subtle);
206
212
  --color-nav-bg: var(--color-neutral-900);
207
213
  --color-nav-text: var(--color-neutral-50);
208
214
  --color-th-background: var(--color-background-tertiary);
@@ -429,16 +435,35 @@ header.top-navbar {
429
435
  z-index: var(--z-fixed);
430
436
  background: var(--color-background-primary);
431
437
  border-bottom: 1px solid var(--color-border-default);
432
- display: flex;
438
+ display: grid;
439
+ grid-template-columns:
440
+ var(--layout-sidebar-width)
441
+ minmax(0, 1fr);
433
442
  align-items: center;
434
- justify-content: flex-start;
435
- padding: 0 var(--space-6);
436
- gap: var(--space-8);
443
+ padding: 0;
437
444
  height: var(--layout-header-height);
438
445
  box-shadow: var(--shadow-sm);
439
446
  }
440
447
 
448
+ body.has-toc header.top-navbar {
449
+ grid-template-columns:
450
+ var(--layout-sidebar-width)
451
+ minmax(0, 1fr)
452
+ minmax(var(--layout-toc-width-min), var(--layout-toc-width-max));
453
+ }
454
+
455
+ @media (width <= 1279px) {
456
+ body.has-toc header.top-navbar {
457
+ grid-template-columns:
458
+ var(--layout-sidebar-width)
459
+ minmax(0, 1fr);
460
+ }
461
+ }
462
+
441
463
  header.top-navbar .navbar-brand {
464
+ grid-column: 1;
465
+ justify-self: start;
466
+ margin-left: var(--space-6);
442
467
  font-size: var(--font-size-xl);
443
468
  font-weight: var(--font-weight-semibold);
444
469
  color: var(--color-text-primary);
@@ -451,12 +476,16 @@ header.top-navbar .navbar-brand:hover {
451
476
  }
452
477
 
453
478
  header.top-navbar .navbar-search {
454
- position: relative;
455
- flex: 0 1 auto;
456
- width: var(--layout-search-width);
479
+ grid-column: 2;
480
+ justify-self: center;
481
+ box-sizing: border-box;
482
+ width: min(100%, var(--layout-content-max-width));
483
+ padding: 0 var(--space-8);
457
484
  }
458
485
 
459
486
  header.top-navbar .navbar-search form {
487
+ position: relative;
488
+ width: min(100%, var(--layout-search-width));
460
489
  margin: 0;
461
490
  padding: 0;
462
491
  }
@@ -470,11 +499,13 @@ header.top-navbar .navbar-search form {
470
499
 
471
500
  /* Theme toggle button */
472
501
  .theme-toggle {
502
+ position: absolute;
503
+ top: 50%;
504
+ right: var(--space-6);
473
505
  display: flex;
474
506
  align-items: center;
475
507
  justify-content: center;
476
508
  padding: var(--space-2);
477
- margin-left: auto;
478
509
  background: transparent;
479
510
  border: 1px solid var(--color-border-default);
480
511
  border-radius: var(--radius-md);
@@ -489,13 +520,14 @@ header.top-navbar .navbar-search form {
489
520
  line-height: 1;
490
521
  width: 2.5rem;
491
522
  height: 2.5rem;
523
+ transform: translateY(-50%);
492
524
  }
493
525
 
494
526
  .theme-toggle:hover {
495
527
  background: var(--color-background-secondary);
496
528
  border-color: var(--color-accent-primary);
497
529
  color: var(--color-accent-primary);
498
- transform: scale(1.05);
530
+ transform: translateY(-50%) scale(1.05);
499
531
  }
500
532
 
501
533
  .theme-toggle:focus {
@@ -505,7 +537,7 @@ header.top-navbar .navbar-search form {
505
537
  }
506
538
 
507
539
  .theme-toggle:active {
508
- transform: scale(0.95);
540
+ transform: translateY(-50%) scale(0.95);
509
541
  }
510
542
 
511
543
  .theme-toggle-icon {
@@ -558,10 +590,24 @@ header.top-navbar .navbar-search form {
558
590
  text-overflow: ellipsis;
559
591
  white-space: nowrap;
560
592
  }
593
+
594
+ .theme-toggle {
595
+ position: static;
596
+ transform: none;
597
+ margin-right: 0;
598
+ }
599
+
600
+ .theme-toggle:hover {
601
+ transform: scale(1.05);
602
+ }
603
+
604
+ .theme-toggle:active {
605
+ transform: scale(0.95);
606
+ }
561
607
  }
562
608
 
563
609
  /* 7. Navigation (Left Sidebar) */
564
- nav {
610
+ #sidebar-navigation {
565
611
  grid-area: nav;
566
612
  font-family: var(--font-heading);
567
613
  font-size: var(--font-size-base);
@@ -580,27 +626,27 @@ nav {
580
626
  }
581
627
 
582
628
  /* Custom scrollbar for WebKit browsers */
583
- nav::-webkit-scrollbar {
629
+ #sidebar-navigation::-webkit-scrollbar {
584
630
  width: 6px;
585
631
  }
586
632
 
587
- nav::-webkit-scrollbar-track {
633
+ #sidebar-navigation::-webkit-scrollbar-track {
588
634
  background: transparent;
589
635
  }
590
636
 
591
- nav::-webkit-scrollbar-thumb {
637
+ #sidebar-navigation::-webkit-scrollbar-thumb {
592
638
  background: var(--color-border-default);
593
639
  border-radius: var(--radius-sm);
594
640
  transition: background var(--transition-fast);
595
641
  }
596
642
 
597
- nav::-webkit-scrollbar-thumb:hover {
643
+ #sidebar-navigation::-webkit-scrollbar-thumb:hover {
598
644
  background: var(--color-border-emphasis);
599
645
  }
600
646
 
601
647
  /* Mobile navigation */
602
648
  @media (width <= 1023px) {
603
- nav {
649
+ #sidebar-navigation {
604
650
  position: fixed;
605
651
  top: var(--layout-header-height);
606
652
  bottom: 0;
@@ -612,7 +658,7 @@ nav::-webkit-scrollbar-thumb:hover {
612
658
  /* Don't set height - let top/bottom define it */
613
659
  }
614
660
 
615
- nav[hidden] {
661
+ #sidebar-navigation[hidden] {
616
662
  display: none;
617
663
  }
618
664
 
@@ -629,7 +675,7 @@ nav::-webkit-scrollbar-thumb:hover {
629
675
  }
630
676
 
631
677
  /* Show backdrop when nav is open */
632
- body.nav-open::before {
678
+ body.sidebar-navigation-open::before {
633
679
  opacity: 1;
634
680
  pointer-events: auto;
635
681
  }
@@ -637,17 +683,18 @@ nav::-webkit-scrollbar-thumb:hover {
637
683
 
638
684
  /* Desktop: hide nav when [hidden] attribute is set */
639
685
  @media (width >= 1024px) {
640
- nav[hidden] {
686
+ #sidebar-navigation[hidden] {
641
687
  display: none;
642
688
  }
643
689
  }
644
690
 
645
- nav .nav-section {
691
+ #sidebar-navigation .nav-section {
646
692
  margin-top: var(--space-6);
647
693
  padding: 0 var(--space-6);
648
694
  }
649
695
 
650
- nav h2, nav h3 {
696
+ #sidebar-navigation h2,
697
+ #sidebar-navigation h3 {
651
698
  font-size: var(--font-size-lg);
652
699
  font-weight: var(--font-weight-semibold);
653
700
  margin: 0 0 var(--space-4);
@@ -656,51 +703,51 @@ nav h2, nav h3 {
656
703
  border-bottom: 1px solid var(--color-border-default);
657
704
  }
658
705
 
659
- nav ul,
660
- nav dl,
661
- nav p {
706
+ #sidebar-navigation ul,
707
+ #sidebar-navigation dl,
708
+ #sidebar-navigation p {
662
709
  padding: 0;
663
710
  list-style: none;
664
711
  margin: var(--space-3) 0;
665
712
  }
666
713
 
667
- nav ul li {
714
+ #sidebar-navigation ul li {
668
715
  margin-bottom: var(--space-2);
669
716
  line-height: var(--line-height-relaxed);
670
717
  }
671
718
 
672
- nav ul li a {
719
+ #sidebar-navigation ul li a {
673
720
  transition:
674
721
  color var(--transition-fast),
675
722
  transform var(--transition-fast),
676
723
  padding var(--transition-fast);
677
724
  }
678
725
 
679
- nav ul li a:hover {
726
+ #sidebar-navigation ul li a:hover {
680
727
  padding-left: var(--space-1);
681
728
  }
682
729
 
683
- nav ul ul {
730
+ #sidebar-navigation ul ul {
684
731
  padding-left: var(--space-5);
685
- margin-top: var(--space-2);
732
+ margin: var(--space-2) 0 0;
686
733
  }
687
734
 
688
- nav ul ul ul {
735
+ #sidebar-navigation ul ul ul {
689
736
  padding-left: var(--space-5);
690
737
  }
691
738
 
692
- nav ul ul ul ul {
739
+ #sidebar-navigation ul ul ul ul {
693
740
  padding-left: var(--space-5);
694
741
  }
695
742
 
696
- nav a {
743
+ #sidebar-navigation a {
697
744
  text-decoration: none;
698
745
  }
699
746
 
700
747
  /* Truncation for direct nav links (not links inside code tags) */
701
- nav .nav-list > li > a,
702
- nav .nav-section > ul > li > a,
703
- nav .nav-section > dl > dd > a {
748
+ #sidebar-navigation .nav-list > li > a,
749
+ #sidebar-navigation .nav-section > ul > li > a,
750
+ #sidebar-navigation .nav-section > dl > dd > a {
704
751
  display: block;
705
752
  max-width: 100%;
706
753
  overflow: hidden;
@@ -708,22 +755,22 @@ nav .nav-section > dl > dd > a {
708
755
  white-space: nowrap;
709
756
  }
710
757
 
711
- nav footer {
758
+ #sidebar-navigation footer {
712
759
  padding: var(--space-4);
713
760
  border-top: 1px solid var(--color-border-default);
714
761
  }
715
762
 
716
- nav footer a {
763
+ #sidebar-navigation footer a {
717
764
  color: var(--color-accent-hover);
718
765
  }
719
766
 
720
- #navigation-toggle {
767
+ #sidebar-navigation-toggle {
721
768
  display: none; /* Hidden by default, shown on mobile */
722
769
  }
723
770
 
724
771
  /* Mobile toggle button */
725
772
  @media (width <= 1023px) {
726
- #navigation-toggle {
773
+ #sidebar-navigation-toggle {
727
774
  display: flex;
728
775
  align-items: center;
729
776
  justify-content: center;
@@ -743,7 +790,7 @@ nav footer a {
743
790
  -webkit-user-select: none;
744
791
  }
745
792
 
746
- #navigation-toggle:hover {
793
+ #sidebar-navigation-toggle:hover {
747
794
  color: var(--color-accent-primary);
748
795
  }
749
796
  }
@@ -754,23 +801,23 @@ nav footer a {
754
801
  * Uses block-size animation with interpolate-size for smooth height transitions.
755
802
  * Both nav-section-collapsible and nested link-list details share this pattern.
756
803
  */
757
- nav details {
804
+ #sidebar-navigation details {
758
805
  interpolate-size: allow-keywords;
759
806
  }
760
807
 
761
- nav details::details-content {
808
+ #sidebar-navigation details::details-content {
762
809
  overflow: hidden;
763
810
  block-size: 0;
764
811
  transition: block-size 200ms ease, content-visibility 200ms ease allow-discrete;
765
812
  }
766
813
 
767
- nav details[open]::details-content {
814
+ #sidebar-navigation details[open]::details-content {
768
815
  block-size: auto;
769
816
  }
770
817
 
771
818
  /* Collapsible Navigation Section Headers */
772
819
 
773
- nav .nav-section-header {
820
+ #sidebar-navigation .nav-section-header {
774
821
  display: flex;
775
822
  align-items: center;
776
823
  gap: var(--space-3);
@@ -784,15 +831,15 @@ nav .nav-section-header {
784
831
  transition: color var(--transition-fast);
785
832
  }
786
833
 
787
- nav .nav-section-header::-webkit-details-marker {
834
+ #sidebar-navigation .nav-section-header::-webkit-details-marker {
788
835
  display: none;
789
836
  }
790
837
 
791
- nav .nav-section-header:hover {
838
+ #sidebar-navigation .nav-section-header:hover {
792
839
  color: var(--color-accent-primary);
793
840
  }
794
841
 
795
- nav .nav-section-icon {
842
+ #sidebar-navigation .nav-section-icon {
796
843
  display: flex;
797
844
  align-items: center;
798
845
  justify-content: center;
@@ -802,12 +849,12 @@ nav .nav-section-icon {
802
849
  color: var(--color-accent-primary);
803
850
  }
804
851
 
805
- nav .nav-section-icon svg {
852
+ #sidebar-navigation .nav-section-icon svg {
806
853
  width: 100%;
807
854
  height: 100%;
808
855
  }
809
856
 
810
- nav .nav-section-title {
857
+ #sidebar-navigation .nav-section-title {
811
858
  font-size: var(--font-size-base);
812
859
  font-weight: var(--font-weight-semibold);
813
860
  color: inherit;
@@ -818,7 +865,7 @@ nav .nav-section-title {
818
865
  white-space: nowrap;
819
866
  }
820
867
 
821
- nav .nav-section-chevron {
868
+ #sidebar-navigation .nav-section-chevron {
822
869
  display: flex;
823
870
  align-items: center;
824
871
  justify-content: center;
@@ -829,46 +876,50 @@ nav .nav-section-chevron {
829
876
  transition: transform var(--transition-base);
830
877
  }
831
878
 
832
- nav .nav-section-chevron svg {
879
+ #sidebar-navigation .nav-section-chevron svg {
833
880
  width: 100%;
834
881
  height: 100%;
835
882
  }
836
883
 
837
884
  /* Rotate chevron when open */
838
- nav .nav-section-collapsible[open] > .nav-section-header .nav-section-chevron {
885
+ #sidebar-navigation .nav-section-collapsible[open] > .nav-section-header .nav-section-chevron {
839
886
  transform: rotate(90deg);
840
887
  }
841
888
 
842
- nav .nav-section-collapsible > ul,
843
- nav .nav-section-collapsible > dl,
844
- nav .nav-section-collapsible > p {
889
+ #sidebar-navigation .nav-section-collapsible > ul,
890
+ #sidebar-navigation .nav-section-collapsible > dl,
891
+ #sidebar-navigation .nav-section-collapsible > p {
845
892
  margin-top: 0;
846
893
  }
847
894
 
848
- nav .nav-section-collapsible > .nav-list {
895
+ #sidebar-navigation .nav-section-collapsible > .nav-list {
849
896
  padding-left: var(--space-5);
850
897
  border-left: 1px solid var(--color-border-subtle);
851
898
  margin-left: 9px; /* Align with the section icon center */
852
899
  }
853
900
 
854
- nav .nav-section-collapsible .nav-list .link-list {
901
+ #sidebar-navigation .nav-section-collapsible .nav-list .link-list {
855
902
  border-left: none;
856
903
  margin-left: 0;
857
904
  padding-left: var(--space-5);
858
905
  }
859
906
 
907
+ #sidebar-navigation .nav-section-collapsible .nav-list .link-list > li:last-child {
908
+ margin-bottom: 0;
909
+ }
910
+
860
911
  /*
861
912
  Improve chevron styling for details under link-list, using SVG chevron that matches nav-section-chevron
862
913
  We need to avoid adding the element in class content generation so it doesn't break darkfish styles
863
914
  */
864
- nav li details:has(.link-list) > summary {
915
+ #sidebar-navigation li details:has(.link-list) > summary {
865
916
  display: inline-flex;
866
917
  align-items: center;
867
918
  gap: var(--space-2);
868
919
  cursor: pointer;
869
920
  }
870
921
 
871
- nav li details:has(.link-list) > summary::after {
922
+ #sidebar-navigation li details:has(.link-list) > summary::after {
872
923
  content: '';
873
924
  position: static;
874
925
  display: inline-block;
@@ -888,11 +939,11 @@ nav li details:has(.link-list) > summary::after {
888
939
  transition: transform var(--transition-base), background-color var(--transition-fast);
889
940
  }
890
941
 
891
- nav li details:has(.link-list) > summary:hover::after {
942
+ #sidebar-navigation li details:has(.link-list) > summary:hover::after {
892
943
  background-color: var(--color-accent-primary);
893
944
  }
894
945
 
895
- nav li details:has(.link-list)[open] > summary::after {
946
+ #sidebar-navigation li details:has(.link-list)[open] > summary::after {
896
947
  transform: rotate(90deg);
897
948
  background-color: var(--color-accent-primary);
898
949
  }
@@ -901,6 +952,7 @@ nav li details:has(.link-list)[open] > summary::after {
901
952
  main {
902
953
  grid-area: main;
903
954
  width: 100%;
955
+ min-width: 0;
904
956
  max-width: var(--layout-content-max-width);
905
957
  margin: 0 auto;
906
958
  padding: var(--space-12) var(--space-8);
@@ -912,7 +964,7 @@ main {
912
964
 
913
965
  /* Desktop: hide hamburger */
914
966
  @media (width >= 1024px) {
915
- #navigation-toggle {
967
+ #sidebar-navigation-toggle {
916
968
  display: none;
917
969
  }
918
970
  }
@@ -935,11 +987,36 @@ main {
935
987
  }
936
988
  }
937
989
 
938
- main h1[class] {
990
+ main h1.page-title {
991
+ display: grid;
992
+ gap: var(--space-2);
993
+ justify-items: start;
939
994
  margin-top: 0;
940
- margin-bottom: 1em;
941
- font-size: 2.5em;
995
+ margin-bottom: var(--space-8);
996
+ color: var(--color-accent-primary);
997
+ }
998
+
999
+ main h1.page-title .page-title-kind {
1000
+ display: inline-flex;
1001
+ align-items: center;
1002
+ min-height: 1.625rem;
1003
+ padding: 0 var(--space-2);
1004
+ border: 1px solid var(--color-title-kind-border);
1005
+ border-radius: var(--radius-md);
1006
+ background: var(--color-accent-subtle);
1007
+ color: var(--color-accent-primary);
1008
+ font-size: var(--font-size-sm);
1009
+ font-weight: var(--font-weight-semibold);
1010
+ line-height: 1;
1011
+ }
1012
+
1013
+ main h1.page-title .page-title-name {
1014
+ max-width: 100%;
942
1015
  color: var(--color-accent-primary);
1016
+ font-size: var(--font-size-3xl);
1017
+ font-weight: var(--font-weight-bold);
1018
+ line-height: var(--line-height-tight);
1019
+ overflow-wrap: anywhere;
943
1020
  }
944
1021
 
945
1022
  main h1,
@@ -1017,7 +1094,6 @@ main h6 a:hover {
1017
1094
  .ruby-ivar { color: var(--code-orange); }
1018
1095
  .ruby-operator { color: var(--code-green); }
1019
1096
  .ruby-identifier { color: var(--code-blue); }
1020
- .ruby-node { color: var(--code-purple); }
1021
1097
 
1022
1098
  .ruby-comment {
1023
1099
  color: var(--color-neutral-500);
@@ -1033,7 +1109,6 @@ main h6 a:hover {
1033
1109
  [data-theme="dark"] .ruby-ivar { color: var(--code-orange); }
1034
1110
  [data-theme="dark"] .ruby-operator { color: var(--code-green); }
1035
1111
  [data-theme="dark"] .ruby-identifier { color: var(--code-blue); }
1036
- [data-theme="dark"] .ruby-node { color: var(--code-purple); }
1037
1112
 
1038
1113
  [data-theme="dark"] .ruby-comment {
1039
1114
  color: var(--color-neutral-400);
@@ -1071,6 +1146,20 @@ main h6 a:hover {
1071
1146
  font-style: italic;
1072
1147
  }
1073
1148
 
1149
+ /* RBS Type Signature Links — linked types get subtle underline */
1150
+ a.rbs-type {
1151
+ color: inherit;
1152
+ text-decoration: underline;
1153
+ text-decoration-color: var(--color-border-default);
1154
+ text-underline-offset: 0.2em;
1155
+ transition: text-decoration-color var(--transition-fast), color var(--transition-fast);
1156
+ }
1157
+
1158
+ a.rbs-type:hover {
1159
+ color: var(--color-link-hover);
1160
+ text-decoration-color: var(--color-link-hover);
1161
+ }
1162
+
1074
1163
  /* Emphasis */
1075
1164
  em {
1076
1165
  text-decoration-color: var(--color-emphasis-decoration);
@@ -1091,6 +1180,22 @@ main p {
1091
1180
  margin-bottom: var(--space-4);
1092
1181
  }
1093
1182
 
1183
+ main .rdoc-logo {
1184
+ margin: var(--space-6) 0 var(--space-8);
1185
+ text-align: center;
1186
+ }
1187
+
1188
+ main .rdoc-logo img {
1189
+ display: inline-block;
1190
+ width: clamp(120px, 14vw, 168px);
1191
+ height: auto;
1192
+ filter: drop-shadow(0 8px 18px rgb(230 41 35 / 8%));
1193
+ }
1194
+
1195
+ [data-theme="dark"] main .rdoc-logo img {
1196
+ filter: saturate(0.58) brightness(1.4) drop-shadow(0 8px 22px rgb(235 84 79 / 16%));
1197
+ }
1198
+
1094
1199
  /* Preformatted Text */
1095
1200
  main pre {
1096
1201
  margin: 1.2em 0.5em;
@@ -1154,17 +1259,19 @@ main dd p:first-child {
1154
1259
 
1155
1260
  /* Headers within Main */
1156
1261
  main header h2 {
1157
- margin-top: 2em;
1262
+ margin: var(--space-8) 0 var(--space-4);
1263
+ padding-top: var(--space-3);
1158
1264
  border-width: 0;
1159
- border-top: 4px solid var(--color-border-default);
1160
- font-size: 130%;
1265
+ border-top: 1px solid var(--color-border-default);
1266
+ font-size: var(--font-size-2xl);
1161
1267
  }
1162
1268
 
1163
1269
  main header h3 {
1164
- margin: 2em 0 1.5em;
1270
+ margin: var(--space-8) 0 var(--space-6);
1271
+ padding-top: var(--space-3);
1165
1272
  border-width: 0;
1166
- border-top: 3px solid var(--color-border-default);
1167
- font-size: 120%;
1273
+ border-top: 1px solid var(--color-border-default);
1274
+ font-size: var(--font-size-xl);
1168
1275
  }
1169
1276
 
1170
1277
  h1:target,
@@ -1237,8 +1344,7 @@ main .method-source-code {
1237
1344
  }
1238
1345
 
1239
1346
  main .method-source-code pre {
1240
- border-color: var(--color-accent-hover);
1241
- border-left: 3px solid var(--color-accent-primary);
1347
+ border-color: var(--color-code-border);
1242
1348
  width: 100%;
1243
1349
  box-sizing: border-box;
1244
1350
  transition: border-color var(--transition-fast);
@@ -1282,6 +1388,7 @@ main .method-description .method-calls-super {
1282
1388
  }
1283
1389
 
1284
1390
  main .method-detail {
1391
+ position: relative;
1285
1392
  margin-bottom: 2.5em;
1286
1393
  }
1287
1394
 
@@ -1292,32 +1399,106 @@ main .method-detail:target {
1292
1399
  }
1293
1400
 
1294
1401
  main .method-header {
1295
- display: inline-block;
1296
- max-width: calc(100% - 6em); /* 6em is the width of the source code toggle */
1402
+ display: grid;
1403
+ grid-template-columns: minmax(0, 1fr) auto;
1404
+ gap: var(--space-4);
1405
+ align-items: center;
1406
+ background: var(--color-sig-bg);
1407
+ border: 1px solid var(--color-sig-border);
1408
+ border-radius: var(--radius-md);
1409
+ padding: var(--space-4);
1410
+ }
1411
+
1412
+ main .method-heading-group {
1413
+ min-width: 0;
1297
1414
  }
1298
1415
 
1299
1416
  main .method-heading {
1300
- position: relative;
1417
+ display: flex;
1418
+ flex-direction: column;
1419
+ align-items: flex-start;
1301
1420
  font-family: var(--font-code);
1302
1421
  font-size: var(--font-size-lg);
1303
1422
  font-weight: var(--font-weight-semibold);
1304
- margin-bottom: var(--space-3);
1423
+ line-height: var(--line-height-normal);
1424
+ }
1425
+
1426
+ main .method-heading a {
1427
+ color: inherit;
1428
+ text-decoration: none;
1429
+ }
1430
+
1431
+ main .method-heading a:hover {
1432
+ color: var(--color-accent-primary);
1433
+ }
1434
+
1435
+ main .method-heading .method-callseq {
1436
+ display: block;
1305
1437
  }
1306
1438
 
1307
1439
  main .method-heading .method-name {
1308
1440
  font-weight: var(--font-weight-semibold);
1441
+ overflow-wrap: anywhere;
1309
1442
  }
1310
1443
 
1311
1444
  main .method-heading .method-args {
1312
1445
  font-weight: var(--font-weight-normal);
1313
1446
  }
1314
1447
 
1448
+ /* Type signatures — overloads stack as a code block under the method name */
1449
+ pre.method-type-signature {
1450
+ position: relative;
1451
+ margin: var(--space-2) 0 0;
1452
+ padding: var(--space-2) 0 0;
1453
+ background: transparent;
1454
+ border: none;
1455
+ border-radius: 0;
1456
+ overflow: visible;
1457
+ font-family: var(--font-code);
1458
+ font-size: var(--font-size-sm);
1459
+ color: var(--color-text-tertiary);
1460
+ line-height: var(--line-height-tight);
1461
+ white-space: pre-wrap;
1462
+ overflow-wrap: break-word;
1463
+ }
1464
+
1465
+ pre.method-type-signature::before {
1466
+ content: '';
1467
+ position: absolute;
1468
+ top: 0;
1469
+ left: 0;
1470
+ right: 0;
1471
+ border-top: 1px dotted var(--color-border-default);
1472
+ }
1473
+
1474
+ pre.method-type-signature code {
1475
+ font-family: inherit;
1476
+ font-size: inherit;
1477
+ color: inherit;
1478
+ background: transparent;
1479
+ padding: 0;
1480
+ }
1481
+
1482
+ /* Attribute type sigs render inline after the [RW] badge */
1483
+ main .method-heading > .method-type-signature {
1484
+ display: inline;
1485
+ margin-left: var(--space-2);
1486
+ font-family: var(--font-code);
1487
+ font-size: var(--font-size-sm);
1488
+ color: var(--color-text-secondary);
1489
+ }
1490
+
1315
1491
  main .method-controls {
1316
- float: right;
1492
+ position: static;
1493
+ align-self: center;
1317
1494
  }
1318
1495
 
1319
1496
  main .method-controls summary {
1320
- display: inline-block;
1497
+ display: inline-flex;
1498
+ align-items: center;
1499
+ justify-content: center;
1500
+ gap: var(--space-2);
1501
+ min-height: 30px;
1321
1502
  line-height: 20px;
1322
1503
  color: var(--color-accent-primary);
1323
1504
  cursor: pointer;
@@ -1334,6 +1515,7 @@ main .method-controls summary {
1334
1515
  transform var(--transition-fast);
1335
1516
  user-select: none;
1336
1517
  -webkit-user-select: none;
1518
+ white-space: nowrap;
1337
1519
  list-style: none;
1338
1520
  }
1339
1521
 
@@ -1351,19 +1533,31 @@ main .method-controls summary:active {
1351
1533
  transform: scale(0.96);
1352
1534
  }
1353
1535
 
1536
+ main .method-source-icon {
1537
+ font-family: var(--font-code);
1538
+ font-size: var(--font-size-xs);
1539
+ line-height: 1;
1540
+ opacity: 0.8;
1541
+ }
1542
+
1354
1543
  [data-theme="dark"] main .method-controls summary:hover {
1355
1544
  background: var(--color-accent-subtle-hover);
1356
1545
  border-color: var(--color-primary-500);
1357
1546
  }
1358
1547
 
1359
- main .method-description,
1360
- main .aliases {
1361
- margin-top: 0.75em;
1548
+ main .method-description {
1362
1549
  color: var(--color-text-primary);
1550
+ line-height: var(--line-height-relaxed);
1551
+ }
1552
+
1553
+ main .method-header ~ .method-description {
1554
+ margin-top: var(--space-5);
1555
+ padding-left: var(--space-2);
1363
1556
  }
1364
1557
 
1365
1558
  main .aliases {
1366
- padding-top: 4px;
1559
+ margin-top: var(--space-4);
1560
+ padding-top: var(--space-1);
1367
1561
  font-style: italic;
1368
1562
  cursor: default;
1369
1563
  }
@@ -1393,7 +1587,7 @@ main .attribute-access-type {
1393
1587
 
1394
1588
  /* Small screen adjustments */
1395
1589
  @media (width <= 480px) {
1396
- nav {
1590
+ #sidebar-navigation {
1397
1591
  width: 85%;
1398
1592
  max-width: 320px;
1399
1593
  }
@@ -1410,9 +1604,22 @@ main .attribute-access-type {
1410
1604
  white-space: nowrap;
1411
1605
  }
1412
1606
 
1607
+ main .method-heading {
1608
+ font-size: var(--font-size-base);
1609
+ }
1610
+
1611
+ pre.method-type-signature {
1612
+ font-size: var(--font-size-xs);
1613
+ }
1614
+
1615
+ main .method-header {
1616
+ grid-template-columns: 1fr;
1617
+ gap: var(--space-3);
1618
+ padding: var(--space-2);
1619
+ }
1620
+
1413
1621
  main .method-controls {
1414
- margin-top: 10px;
1415
- float: none;
1622
+ justify-self: start;
1416
1623
  }
1417
1624
  }
1418
1625
 
@@ -1594,7 +1801,7 @@ main .attribute-access-type {
1594
1801
  }
1595
1802
 
1596
1803
  /* 10. Right Sidebar - Table of Contents */
1597
- aside.table-of-contents {
1804
+ #table-of-contents {
1598
1805
  grid-area: toc;
1599
1806
  align-self: start;
1600
1807
  position: sticky;
@@ -1605,43 +1812,45 @@ aside.table-of-contents {
1605
1812
  font-size: var(--font-size-base);
1606
1813
  }
1607
1814
 
1608
- aside.table-of-contents * {
1609
- border-right: none !important;
1610
- outline: none !important;
1611
- }
1612
-
1613
- aside.table-of-contents .toc-sticky {
1815
+ #table-of-contents .toc-sticky {
1614
1816
  display: flex;
1615
1817
  flex-direction: column;
1616
1818
 
1617
- /* Exclude header height and top/bottom padding of aside.table-of-contents */
1819
+ /* Exclude header height and top/bottom padding of #table-of-contents */
1618
1820
  height: calc(100vh - var(--layout-header-height) - var(--space-8) * 2);
1619
1821
  }
1620
1822
 
1621
- aside.table-of-contents .toc-sticky nav {
1622
- height: auto;
1823
+ #table-of-contents .toc-nav {
1824
+ flex: 1 1 auto;
1825
+ min-height: 0;
1826
+ overflow-y: auto;
1827
+ scrollbar-width: thin;
1828
+ scrollbar-color: var(--color-border-default) transparent;
1623
1829
  }
1624
1830
 
1625
- aside.table-of-contents .toc-list > .toc-h2 {
1831
+ #table-of-contents .toc-list > .toc-h2 {
1626
1832
  margin-left: var(--space-4);
1627
1833
  }
1628
1834
 
1629
- aside.table-of-contents .toc-list > .toc-h3 {
1835
+ #table-of-contents .toc-list > .toc-h3 {
1630
1836
  margin-left: var(--space-8);
1631
1837
  }
1632
1838
 
1633
1839
  /* Hide TOC on mobile/tablet */
1634
1840
  @media (width <= 1279px) {
1635
- aside.table-of-contents {
1841
+ #table-of-contents {
1636
1842
  display: none;
1637
1843
  }
1844
+ }
1638
1845
 
1846
+ /* Preserve the desktop sidebar/content grid when the TOC is hidden */
1847
+ @media (width >= 1024px) and (width <= 1279px) {
1639
1848
  body.has-toc {
1640
1849
  grid-template-columns: var(--layout-sidebar-width) 1fr;
1641
1850
  grid-template-areas:
1642
1851
  "header header"
1643
1852
  "nav main"
1644
- "footer footer";
1853
+ "nav footer";
1645
1854
  }
1646
1855
  }
1647
1856
 
@@ -1657,31 +1866,31 @@ aside.table-of-contents .toc-list > .toc-h3 {
1657
1866
  }
1658
1867
  }
1659
1868
 
1660
- .table-of-contents h3 {
1869
+ #table-of-contents h3 {
1661
1870
  font-size: var(--font-size-lg);
1662
1871
  font-weight: var(--font-weight-semibold);
1663
1872
  margin: 0 0 var(--space-5) 0;
1664
1873
  color: var(--color-text-primary);
1665
1874
  }
1666
1875
 
1667
- .table-of-contents ul {
1876
+ #table-of-contents ul {
1668
1877
  margin: 0;
1669
1878
  padding: 0;
1670
1879
  list-style: none;
1671
1880
  }
1672
1881
 
1673
- .table-of-contents ul ul {
1882
+ #table-of-contents ul ul {
1674
1883
  margin-top: var(--space-3);
1675
1884
  margin-left: var(--space-5);
1676
1885
  border-left: 1px solid var(--color-border-default);
1677
1886
  padding-left: var(--space-4);
1678
1887
  }
1679
1888
 
1680
- .table-of-contents li {
1889
+ #table-of-contents li {
1681
1890
  margin-bottom: var(--space-3);
1682
1891
  }
1683
1892
 
1684
- .table-of-contents a {
1893
+ #table-of-contents a {
1685
1894
  display: block;
1686
1895
  color: var(--color-text-secondary);
1687
1896
  text-decoration: none;
@@ -1692,32 +1901,46 @@ aside.table-of-contents .toc-list > .toc-h3 {
1692
1901
  }
1693
1902
 
1694
1903
  /* Nav hover styles sit here to keep specificity ordering with TOC links */
1695
- nav a:hover {
1904
+ #sidebar-navigation a:hover {
1696
1905
  color: var(--color-link-hover);
1697
1906
  text-decoration: underline;
1698
1907
  }
1699
1908
 
1700
- .table-of-contents a:hover {
1909
+ #table-of-contents a:hover {
1701
1910
  color: var(--color-link-hover);
1911
+ text-decoration: underline;
1702
1912
  }
1703
1913
 
1704
- .table-of-contents a.active {
1914
+ #table-of-contents a:focus-visible {
1915
+ outline: 2px solid var(--color-accent-primary);
1916
+ outline-offset: 2px;
1917
+ border-radius: var(--radius-sm);
1918
+ }
1919
+
1920
+ #table-of-contents a.active {
1705
1921
  color: var(--color-accent-primary);
1706
1922
  font-weight: var(--font-weight-medium);
1707
1923
  }
1708
1924
 
1709
1925
  ol.breadcrumb {
1710
1926
  display: flex;
1927
+ flex-wrap: wrap;
1711
1928
  padding: 0;
1712
1929
  margin: 0 0 1em;
1713
1930
  }
1714
1931
 
1715
1932
  ol.breadcrumb li {
1716
1933
  display: block;
1934
+ min-width: 0;
1717
1935
  list-style: none;
1718
1936
  font-size: 125%;
1719
1937
  }
1720
1938
 
1939
+ ol.breadcrumb a,
1940
+ ol.breadcrumb li > span:not(.separator) {
1941
+ overflow-wrap: anywhere;
1942
+ }
1943
+
1721
1944
  /* 11. Footer */
1722
1945
  footer.site-footer {
1723
1946
  grid-area: footer;
@@ -1909,6 +2132,8 @@ footer.site-footer .footer-bottom:first-child {
1909
2132
  }
1910
2133
 
1911
2134
  header.top-navbar #search-field {
2135
+ display: block;
2136
+ box-sizing: border-box;
1912
2137
  width: 100%;
1913
2138
  padding: var(--space-2) var(--space-4);
1914
2139
  border: 1px solid var(--color-border-default);
@@ -1931,10 +2156,11 @@ header.top-navbar #search-field::placeholder {
1931
2156
 
1932
2157
  /* Search results dropdown in navbar */
1933
2158
  header.top-navbar #search-results-desktop {
2159
+ box-sizing: border-box;
1934
2160
  position: absolute;
1935
2161
  top: calc(100% + var(--space-2));
1936
2162
  left: 0;
1937
- width: var(--layout-search-width);
2163
+ width: 100%;
1938
2164
  max-height: 60vh;
1939
2165
  background: var(--color-background-primary);
1940
2166
  border: 1px solid var(--color-border-default);