11/* rustledger theme - dark mode with orange accent */
22
3+ /* ========================================
4+ CSS CUSTOM PROPERTIES
5+ ======================================== */
6+
37: root {
4- /* Orange accent color (matching #f97316) */
8+ /* Orange accent color */
59 --vp-c-brand-1 : # f97316 ;
610 --vp-c-brand-2 : # fb923c ;
711 --vp-c-brand-3 : # fdba74 ;
1216 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI' , Roboto, sans-serif;
1317 --vp-font-family-mono :
1418 ui-monospace, SFMono-Regular, 'SF Mono' , Menlo, Monaco, Consolas, monospace;
19+
20+ /*
21+ * Secondary nav height - VitePress reads this variable
22+ * and automatically adjusts VPNav, VPSidebar, VPLocalNav positioning
23+ */
24+ --vp-layout-top-height : 33px ;
25+
26+ /* Layout widths */
27+ --vp-layout-max-width : 1400px ;
1528}
1629
1730/* Force dark mode always */
4457
4558 /* Custom property for accent text */
4659 --accent : # f97316 ;
47-
48- /* Layout widths */
49- --vp-layout-max-width : 1400px ;
5060}
5161
5262/* Make html/body black */
@@ -55,37 +65,24 @@ body {
5565 background-color : # 000 !important ;
5666}
5767
58- /* Nav styling - push down to make room for secondary nav */
68+ /* ========================================
69+ NAV STYLING
70+
71+ VitePress automatically handles positioning using
72+ --vp-layout-top-height. We only need to style colors.
73+ ======================================== */
74+
5975.VPNav {
6076 background-color : rgba (0 , 0 , 0 , 0.9 ) !important ;
6177 backdrop-filter : blur (8px );
62- top : 33px !important ;
6378}
6479
65- /* Adjust content for secondary nav */
6680.VPSidebar {
67- top : calc ( var ( --vp-nav-height ) + 33 px ) !important ;
81+ background-color : # 000 !important ;
6882}
6983
7084.VPContent {
71- padding-top : 33px !important ;
72- }
73-
74- /* Ensure doc content has proper top margin for secondary nav */
75- .VPDoc {
76- margin-top : 33px !important ;
77- }
78-
79- /* Local nav (contains hamburger menu on mobile) */
80- .VPLocalNav {
81- margin-top : 33px !important ;
82- }
83-
84- /* Home page layout - needs extra padding for both navbars */
85- .VPHome ,
86- .Layout > main ,
87- .is-home .VPContent {
88- padding-top : calc (var (--vp-nav-height ) + 33px ) !important ;
85+ background-color : # 000 !important ;
8986}
9087
9188/* Hide the extra menu (...) button */
@@ -94,10 +91,9 @@ body {
9491}
9592
9693/* ========================================
97- HOME PAGE SPECIFIC STYLES
94+ HOME PAGE STYLES
9895 ======================================== */
9996
100- /* Remove default page padding on home */
10197.is-home .VPDoc .vp-doc {
10298 padding : 0 !important ;
10399}
@@ -114,7 +110,6 @@ body {
114110 display : none !important ;
115111}
116112
117- /* Ensure full width on home page */
118113.is-home .VPDoc > .container > .content {
119114 max-width : 100% !important ;
120115 padding : 0 !important ;
@@ -124,6 +119,10 @@ body {
124119 max-width : 100% !important ;
125120}
126121
122+ /* ========================================
123+ COMPONENT STYLES
124+ ======================================== */
125+
127126/* Feature cards */
128127.VPFeature {
129128 background-color : # 0a0a0a !important ;
@@ -163,16 +162,6 @@ body {
163162 background-color : rgba (255 , 255 , 255 , 0.15 ) !important ;
164163}
165164
166- /* Sidebar */
167- .VPSidebar {
168- background-color : # 000 !important ;
169- }
170-
171- /* Content area */
172- .VPContent {
173- background-color : # 000 !important ;
174- }
175-
176165/* Footer */
177166.VPFooter {
178167 background-color : # 000 !important ;
@@ -219,99 +208,23 @@ body {
219208 --vp-local-search-bg : # 0a0a0a ;
220209}
221210
222- /* Custom accent class for inline use */
211+ /* Custom accent class */
223212.accent {
224213 color : # f97316 ;
225214}
226215
227216/* ========================================
228- MOBILE RESPONSIVE FIXES
217+ NARROW VIEWPORT
229218 ======================================== */
230219
231220@media (max-width : 768px ) {
232- /* Hide site title text on mobile, keep only logo */
233- .VPNavBarTitle .title {
234- display : none !important ;
221+ : root {
222+ --vp-layout-top-height : 28px ;
235223 }
236224
237- /* Remove extra top spacing on mobile */
238- .VPDoc {
239- margin-top : 0 !important ;
240- }
241-
242- /* Fix content padding on mobile */
243- .VPContent {
244- padding-top : 0 !important ;
245- }
246-
247- /* Make secondary nav smaller on mobile */
248- .secondary-nav {
249- padding : 0.25rem 0.5rem !important ;
250- }
251-
252- .secondary-nav-links {
253- gap : 1rem !important ;
254- font-size : 0.75rem !important ;
255- }
256-
257- /* Adjust nav position for smaller secondary nav */
258- .VPNav {
259- top : 28px !important ;
260- }
261-
262- .VPSidebar {
263- top : calc (var (--vp-nav-height ) + 28px ) !important ;
264- }
265-
266- /* Hide the floating local nav bar on home (not the sidebar itself) */
267- .is-home .VPLocalNav {
268- display : none !important ;
269- }
270-
271- /* Remove sidebar space on home - sidebar is accessed via hamburger menu */
272- .is-home .VPContent {
273- padding-left : 0 !important ;
274- margin-left : 0 !important ;
275- padding-top : 0 !important ;
276- }
277-
278- .is-home .VPContent .has-sidebar {
279- padding-top : 0 !important ;
280- }
281-
282- /* Ensure main content starts immediately after nav */
283- .is-home main {
284- padding-top : 0 !important ;
285- margin-top : 0 !important ;
286- }
287-
288- /* Mobile nav menu - ensure it's visible and properly styled */
289- .VPNavBarMenu {
290- background-color : # 000 !important ;
291- border-bottom : 1px solid rgba (255 , 255 , 255 , 0.1 );
292- }
293-
294- .VPNavBarMenu .VPNavBarMenuLink {
295- color : white !important ;
296- }
297-
298- /* Mobile nav screen (hamburger menu dropdown) */
225+ /* Mobile nav screen styling */
299226 .VPNavScreen {
300227 background-color : # 000 !important ;
301- top : calc (var (--vp-nav-height ) + 28px ) !important ;
302- position : fixed !important ;
303- left : 0 !important ;
304- right : 0 !important ;
305- bottom : 0 !important ;
306- height : calc (100vh - var (--vp-nav-height ) - 28px ) !important ;
307- height : calc (100dvh - var (--vp-nav-height ) - 28px ) !important ;
308- z-index : 99 !important ;
309- padding : 1.5rem !important ;
310- overflow-y : auto !important ;
311- }
312-
313- .VPNavScreen .open {
314- display : block !important ;
315228 }
316229
317230 .VPNavScreenMenu {
@@ -320,18 +233,13 @@ body {
320233
321234 .VPNavScreenMenuLink {
322235 color : white !important ;
323- display : block !important ;
324- padding : 0.75rem 0 !important ;
325- font-size : 1.1rem !important ;
326- }
327-
328- /* Ensure nav screen container is visible */
329- .VPNavBar .container > .content > .content-body {
330- position : relative;
331236 }
332237}
333238
334- /* 404 page - hide sidebar and nav elements */
239+ /* ========================================
240+ 404 PAGE
241+ ======================================== */
242+
335243.NotFound .VPSidebar ,
336244.NotFound .VPDoc .aside {
337245 display : none !important ;
0 commit comments