Skip to content

Commit 65ff26a

Browse files
authored
Merge pull request #1 from dotnetdevsaustria/copilot/fix-header-links-styling
Fix header navigation wrapping on mobile viewports
2 parents fdc05d6 + 0c2458d commit 65ff26a

1 file changed

Lines changed: 41 additions & 13 deletions

File tree

assets/css/main.scss

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -219,27 +219,34 @@ h1, h2, h3, h4, h5, h6 {
219219
/* Mobile navigation optimizations */
220220
@media (max-width: 768px) {
221221
.greedy-nav {
222+
flex-wrap: nowrap !important;
223+
222224
a.site-title {
223-
font-size: 0.9em;
224-
margin-inline-end: 0.5rem !important;
225+
font-size: 0.85em;
226+
margin-inline-end: 0.3rem !important;
227+
white-space: nowrap;
225228
}
226229

227230
.visible-links {
228-
margin-inline-end: 0.5rem;
231+
margin-inline-end: 0.3rem;
232+
flex-wrap: nowrap !important;
229233

230-
li:first-child {
234+
li {
235+
/* All items need flex: 0 0 auto to prevent shrinking and stay on one line */
231236
flex: 0 0 auto !important;
232237
}
233238

234239
a {
235-
margin: 0 0.5rem !important;
236-
font-size: 0.9em;
240+
margin: 0 0.3rem !important;
241+
font-size: 0.85em;
242+
white-space: nowrap;
237243
}
238244
}
239245

240246
.theme-toggle {
241-
margin-inline-start: 0.25rem;
242-
padding: 0.4em;
247+
margin-inline-start: 0.15rem;
248+
padding: 0.35em;
249+
flex-shrink: 0;
243250
}
244251
}
245252

@@ -401,14 +408,35 @@ table {
401408
padding: 1.5em;
402409
}
403410

404-
.theme-toggle {
405-
padding: 0.375em;
411+
.greedy-nav {
412+
a.site-title {
413+
font-size: 0.8em;
414+
margin-inline-end: 0.2rem !important;
415+
}
416+
417+
.visible-links {
418+
margin-inline-end: 0.2rem;
419+
420+
a {
421+
margin: 0 0.2rem !important;
422+
font-size: 0.8em;
423+
}
424+
}
406425

407-
svg {
408-
width: 1.125em;
409-
height: 1.125em;
426+
.theme-toggle {
427+
margin-inline-start: 0.1rem;
428+
padding: 0.3em;
429+
430+
svg {
431+
width: 1em;
432+
height: 1em;
433+
}
410434
}
411435
}
436+
437+
.site-logo img {
438+
max-height: 1.3rem !important;
439+
}
412440
}
413441

414442
/* ==========================================================================

0 commit comments

Comments
 (0)