1
+ /* Dark mode styles, applied only when body has the dark-mode class */
2
+ body .dark-mode {
3
+ background-color : # 252525 ; /* Slightly lighter dark gray */
4
+ color : # e0e0e0 ; /* Light gray text */
5
+ }
6
+
7
+ body .dark-mode .wy-nav-top {
8
+ background-color : # 2b2b2b ; /* Darker header */
9
+ }
10
+
11
+ body .dark-mode .wy-nav-side {
12
+ background-color : # 2b2b2b ; /* Dark sidebar */
13
+ }
14
+
15
+ body .dark-mode .wy-menu-vertical a {
16
+ color : # e0e0e0 ; /* Light sidebar links */
17
+ }
18
+
19
+ body .dark-mode .wy-menu-vertical a : hover {
20
+ background-color : # 3c3c3c ; /* Hover effect for general links */
21
+ }
22
+
23
+ body .dark-mode .wy-nav-content {
24
+ background-color : # 252525 ; /* Match the body background */
25
+ }
26
+
27
+ body .dark-mode h1 ,
28
+ body .dark-mode h2 ,
29
+ body .dark-mode h3 ,
30
+ body .dark-mode h4 ,
31
+ body .dark-mode h5 ,
32
+ body .dark-mode h6 {
33
+ color : # ffffff ; /* White headings */
34
+ }
35
+
36
+ body .dark-mode a {
37
+ color : # 4da8da ; /* Light blue links */
38
+ }
39
+
40
+ body .dark-mode a : hover {
41
+ color : # 66b3ff ; /* Lighter blue on hover */
42
+ }
43
+
44
+ body .dark-mode pre {
45
+ background-color : # 2b2b2b ; /* Dark code background */
46
+ color : # e0e0e0 ; /* Light code text */
47
+ border : 1px solid # 3c3c3c ;
48
+ }
49
+
50
+ /* Optional: Style the toggle button */
51
+ button {
52
+ padding : 8px 16px ;
53
+ background-color : # 4da8da ;
54
+ color : white;
55
+ border : none;
56
+ border-radius : 4px ;
57
+ cursor : pointer;
58
+ }
59
+
60
+ button : hover {
61
+ background-color : # 66b3ff ;
62
+ }
63
+
64
+ body .dark-mode button {
65
+ background-color : # 2b2b2b ;
66
+ color : # e0e0e0 ;
67
+ }
68
+
69
+ body .dark-mode button : hover {
70
+ background-color : # 3c3c3c ;
71
+ }
72
+
73
+ /* Ensure proper layout in wy-breadcrumbs */
74
+ .wy-breadcrumbs {
75
+ position : relative;
76
+ padding : 0 10px ;
77
+ overflow : hidden; /* Contain floated elements */
78
+ white-space : nowrap; /* Prevent wrapping */
79
+ }
80
+
81
+ /* Style <li> elements to stay inline */
82
+ .wy-breadcrumbs li {
83
+ display : inline-block;
84
+ margin-right : 5px ;
85
+ vertical-align : middle; /* Align breadcrumb items */
86
+ }
87
+
88
+ /* Style wy-breadcrumbs-aside to keep "View page source" on the right */
89
+ .wy-breadcrumbs-aside {
90
+ float : right; /* Matches theme's default behavior */
91
+ display : inline-block;
92
+ margin-left : 10px ; /* Space from button */
93
+ }
94
+
95
+ /* Ensure "View page source" aligns properly */
96
+ .wy-breadcrumbs-aside a {
97
+ display : inline-block;
98
+ vertical-align : middle;
99
+ }
100
+
101
+ /* Style the button directly in wy-breadcrumbs to stay on the right */
102
+ .wy-breadcrumbs button {
103
+ float : right; /* Pin to the right */
104
+ margin-left : 10px ; /* Space from breadcrumb text */
105
+ margin-right : 10px ; /* Space before "View page source" */
106
+ vertical-align : middle; /* Align with other items */
107
+ }
108
+
109
+ /* Keep <a class="icon icon-home">GhostBSD</a> white in both modes */
110
+ .wy-side-nav-search .icon .icon-home : not ([aria-label = "Home" ]) {
111
+ color : # ffffff ; /* White in light mode */
112
+ }
113
+
114
+ body .dark-mode .wy-side-nav-search .icon .icon-home : not ([aria-label = "Home" ]) {
115
+ color : # ffffff ; /* White in dark mode */
116
+ }
117
+
118
+ /* Fix white background of .toctree-l1.current in dark mode */
119
+ body .dark-mode .wy-menu-vertical .toctree-l1 .current {
120
+ background-color : # 3c3c3c ; /* Slightly lighter than sidebar */
121
+ }
122
+
123
+ /* Darken background of <a class="reference internal current"> in dark mode */
124
+ body .dark-mode .wy-menu-vertical a .reference .internal .current {
125
+ background-color : # 333333 ; /* Darker than #3c3c3c */
126
+ }
127
+
128
+ /* Ensure .toctree-l2 <a> fills the li and darkens on hover */
129
+ .wy-menu-vertical .toctree-l2 a {
130
+ display : block; /* Ensure it fills the li */
131
+ }
132
+
133
+ body .dark-mode .wy-menu-vertical .toctree-l2 a : hover {
134
+ background-color : # 2a2a2a !important ; /* Darker than #3c3c3c, override all */
135
+ }
136
+
137
+ /* Ensure <a> in sidebar fills its parent <li> */
138
+ .wy-menu-vertical .toctree-l1 a {
139
+ display : block; /* Ensure it fills the li */
140
+ }
141
+
142
+ /* Ensure <a> in toctree-l3 fills its parent <li> */
143
+ .wy-menu-vertical .toctree-l3 a {
144
+ display : block; /* Ensure it fills the li */
145
+ }
146
+
147
+ /* Darken <a href="#"> inside .toctree-l1.current[aria-expanded="true"] at all times */
148
+ body .dark-mode .wy-menu-vertical .toctree-l1 .current [aria-expanded = "true" ] a [href = "#" ] {
149
+ background-color : # 2b2b2b ; /* Darker than #3c3c3c, constant background */
150
+ }
151
+
152
+ /* Highly specific override for .toctree-l2.current in dark mode */
153
+ body .dark-mode .wy-nav-side .wy-menu .wy-menu-vertical ul li .current .toctree-l2 {
154
+ background-color : # 3c3c3c !important ; /* Reordered classes for specificity */
155
+ }
156
+
157
+ /* Ensure li.toctree-l2.current has the correct background in dark mode */
158
+ body .dark-mode .wy-menu-vertical li .toctree-l2 .current {
159
+ background-color : # 3c3c3c !important ;
160
+ }
161
+
162
+ /* Ensure the <a> inside li.toctree-l2.current does not override the background */
163
+ body .dark-mode .wy-menu-vertical li .toctree-l2 .current a {
164
+ background-color : transparent !important ;
165
+ }
166
+
167
+ /* Ensure nested <ul> inside li.toctree-l2.current does not override the background */
168
+ body .dark-mode .wy-menu-vertical li .toctree-l2 .current ul {
169
+ background-color : transparent !important ;
170
+ }
171
+
172
+ /* Ensure hover effect for toctree-l3 links in dark mode */
173
+ body .dark-mode .wy-nav-side .wy-menu .wy-menu-vertical li .toctree-l3 a : hover {
174
+ background-color : # 2a2a2a !important ; /* Darker than #3c3c3c, override all */
175
+ }
176
+
177
+ /* Prevent parent li.toctree-l3 from interfering with hover effect */
178
+ body .dark-mode .wy-menu-vertical li .toctree-l3 : hover {
179
+ background-color : transparent !important ;
180
+ }
181
+
182
+ /* Ensure li.toctree-l3.current has the correct background in dark mode */
183
+ body .dark-mode .wy-menu-vertical li .toctree-l3 .current {
184
+ background-color : # 3c3c3c !important ; /* Matches toctree-l2.current */
185
+ }
186
+
187
+ /* Ensure the <a> inside li.toctree-l3.current does not override the background */
188
+ body .dark-mode .wy-menu-vertical li .toctree-l3 .current a {
189
+ background-color : transparent !important ;
190
+ }
0 commit comments