Skip to content

Commit 9d224b6

Browse files
Improve command docs TOC styling and responsiveness
Adjusted the command header font size and enabled word breaking for better readability. Made the table of contents sticky with a blurred background, improved dark mode background, and enhanced mobile responsiveness with horizontal scrolling and compact styling.
1 parent f117529 commit 9d224b6

File tree

1 file changed

+31
-10
lines changed

1 file changed

+31
-10
lines changed

static/css/command-docs.css

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@
143143
}
144144

145145
.command-header h1 {
146-
font-size: 1.75rem !important;
146+
font-size: 1.25rem !important;
147+
word-break: break-word;
147148
}
148149

149150
.command-header-top {
@@ -338,6 +339,12 @@ article table tbody tr:hover {
338339
border-left: 3px solid #22C55E;
339340
border-radius: 8px;
340341
font-size: 0.9rem;
342+
/* Sticky positioning */
343+
position: sticky;
344+
top: 80px; /* Below fixed header */
345+
z-index: 40;
346+
backdrop-filter: blur(8px);
347+
background: rgba(246, 248, 250, 0.95);
341348
}
342349

343350
.command-toc .toc-label {
@@ -378,7 +385,7 @@ article table tbody tr:hover {
378385
}
379386

380387
.dark .command-toc {
381-
background: #1c2128;
388+
background: rgba(28, 33, 40, 0.95);
382389
border-color: #30363d;
383390
border-left-color: #22C55E;
384391
}
@@ -401,23 +408,37 @@ article table tbody tr:hover {
401408
background: rgba(34, 197, 94, 0.18);
402409
}
403410

404-
/* Mobile: stack vertically */
411+
/* Mobile: compact horizontal scroll */
405412
@media (max-width: 640px) {
406413
.command-toc {
407-
flex-direction: column;
408-
align-items: flex-start;
414+
top: 64px; /* Smaller header on mobile */
415+
flex-wrap: nowrap;
416+
overflow-x: auto;
417+
-webkit-overflow-scrolling: touch;
418+
scrollbar-width: none; /* Firefox */
419+
padding: 0.625rem 1rem;
409420
gap: 0.25rem;
410-
padding: 0.75rem 1rem;
421+
margin-left: -1.5rem;
422+
margin-right: -1.5rem;
423+
border-radius: 0;
424+
border-left: none;
425+
border-right: none;
426+
width: calc(100% + 3rem);
427+
}
428+
429+
.command-toc::-webkit-scrollbar {
430+
display: none; /* Chrome, Safari */
411431
}
412432

413433
.command-toc .toc-label {
414-
margin-bottom: 0.5rem;
415-
margin-right: 0;
434+
flex-shrink: 0;
416435
}
417436

418437
.command-toc a {
419-
width: 100%;
420-
padding: 0.5rem 0.75rem;
438+
flex-shrink: 0;
439+
white-space: nowrap;
440+
padding: 0.375rem 0.625rem;
441+
font-size: 0.85rem;
421442
}
422443
}
423444

0 commit comments

Comments
 (0)