Skip to content

Commit 636cf47

Browse files
committed
update global font sizes
1 parent d1974c7 commit 636cf47

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

src/css/custom.css

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -444,33 +444,60 @@ body[data-rh] .redocusaurus {
444444
}
445445

446446

447-
/* --- Docs sidebar typography: bold only top-level categories --- */
447+
/* --- Docs sidebar typography: desktop + mobile (drawer) --- */
448448

449449
/* Reset: all sidebar links use base font at normal weight */
450-
.theme-doc-sidebar-container .menu__link {
450+
:where(.theme-doc-sidebar-container, .navbar-sidebar) .menu__link {
451451
font-family: var(--ifm-font-family-base) !important;
452452
font-weight: 400 !important;
453453
}
454454

455455
/* Top-level categories (expand/collapse) → true bold (700) */
456-
.theme-doc-sidebar-container
456+
:where(.theme-doc-sidebar-container, .navbar-sidebar)
457457
.theme-doc-sidebar-item-category-level-1
458458
> .menu__list-item-collapsible
459459
> :is(a,button).menu__link--sublist {
460460
font-family: var(--ifm-font-family-base) !important;
461-
font-weight: 700 !important; /* heavier than theme semibold (≈500) */
461+
font-weight: 700 !important;
462+
font-size: 1rem; /* keep full size for top-level */
463+
}
464+
465+
/* Fallback (some themes don’t emit the -level-1 class consistently on mobile) */
466+
.navbar-sidebar
467+
.menu__list > .theme-doc-sidebar-item-category
468+
> .menu__list-item-collapsible
469+
> :is(a,button).menu__link--sublist {
470+
font-weight: 700 !important;
471+
font-size: 1rem;
462472
}
463473

464474
/* Nested categories (level ≥ 2) stay normal */
465-
.theme-doc-sidebar-container
475+
:where(.theme-doc-sidebar-container, .navbar-sidebar)
466476
.theme-doc-sidebar-item-category:not(.theme-doc-sidebar-item-category-level-1)
467477
> .menu__list-item-collapsible
468478
> :is(a,button).menu__link--sublist {
469479
font-weight: 400 !important;
470480
}
471481

472-
/* Page links (including active) stay normal */
473-
.theme-doc-sidebar-container .theme-doc-sidebar-item-link .menu__link,
474-
.theme-doc-sidebar-container .theme-doc-sidebar-item-link .menu__link.menu__link--active {
482+
/* Page links (including active) slightly smaller + normal weight */
483+
:where(.theme-doc-sidebar-container, .navbar-sidebar)
484+
.theme-doc-sidebar-item-link .menu__link,
485+
:where(.theme-doc-sidebar-container, .navbar-sidebar)
486+
.theme-doc-sidebar-item-link .menu__link.menu__link--active {
475487
font-weight: 400 !important;
488+
font-size: .85rem;
476489
}
490+
491+
492+
/* --- Global typography --- */
493+
494+
/* Primary: Infima base font size (affects rem-based components) */
495+
:root {
496+
--ifm-font-size-base: 14px;
497+
}
498+
499+
/* Fallback: ensure everything follows the smaller base */
500+
html {
501+
font-size: 14px;
502+
}
503+

0 commit comments

Comments
 (0)