Skip to content

Commit 086a010

Browse files
committed
style(navbar): min-height 80px, logo/theme toggle 64x64, improved alignment and spacing
1 parent abf1ba0 commit 086a010

1 file changed

Lines changed: 51 additions & 1 deletion

File tree

codeprism-docs/src/css/custom.css

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ a[href*="sponsor"]:hover {
335335
background: var(--white);
336336
border-bottom: 1px solid var(--gainsboro);
337337
box-shadow: var(--shadow-sm);
338-
padding: 1rem 0;
338+
padding: 0.5rem 0; /* reduce vertical padding, rely on min-height for consistent height */
339+
min-height: 80px; /* ensure navbar is at least 80px tall */
339340
}
340341

341342
/* Add horizontal padding so brand and toggles are not flush to edges */
@@ -344,6 +345,55 @@ a[href*="sponsor"]:hover {
344345
padding-right: var(--ifm-spacing-horizontal);
345346
}
346347

348+
/* Ensure inner content aligns vertically */
349+
.navbar__inner,
350+
.navbar__items,
351+
.navbar__brand {
352+
display: flex;
353+
align-items: center;
354+
}
355+
356+
/* Brand logo sizing and spacing */
357+
.navbar__brand {
358+
padding-left: 0.75rem;
359+
padding-right: 0.75rem;
360+
}
361+
362+
.navbar__brand img,
363+
.navbar__logo,
364+
.navbar__brand .themedImage--light img,
365+
.navbar__brand .themedImage--dark img {
366+
width: 64px !important;
367+
height: 64px !important;
368+
object-fit: contain;
369+
}
370+
371+
/* Theme toggle (dark mode) button sizing and spacing */
372+
button[aria-label="Switch between dark and light mode"],
373+
button[title*="dark"],
374+
button[title*="light"],
375+
button[aria-label*="dark"],
376+
button[aria-label*="light"] {
377+
width: 64px !important;
378+
height: 64px !important;
379+
display: inline-flex !important;
380+
align-items: center !important;
381+
justify-content: center !important;
382+
margin-left: 0.75rem !important;
383+
margin-right: 0.75rem !important;
384+
border-radius: 8px; /* keeps it neat if background applied by theme */
385+
}
386+
387+
/* Make sure the icon inside the toggle scales appropriately */
388+
button[aria-label="Switch between dark and light mode"] svg,
389+
button[title*="dark"] svg,
390+
button[title*="light"] svg,
391+
button[aria-label*="dark"] svg,
392+
button[aria-label*="light"] svg {
393+
width: 28px;
394+
height: 28px;
395+
}
396+
347397
.navbar__brand {
348398
font-family: var(--ifm-font-family-base);
349399
font-weight: 600;

0 commit comments

Comments
 (0)