Skip to content

Commit c077b4d

Browse files
committed
Minor tweaks
- Use lobotomized owls instead of gap on no-js styles - Remove unused classes
1 parent 861a2ef commit c077b4d

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

src/components/page/header.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ import {
5555
</button>
5656
</template>
5757
<ul id={navListId} class="nav-list">
58-
<li class="nav-item"><a href="/">About</a></li>
59-
<li class="nav-item"><a href="/projects">Projects</a></li>
60-
<li class="nav-item"><a href="/notes">Notes</a></li>
58+
<li><a href="/">About</a></li>
59+
<li><a href="/projects">Projects</a></li>
60+
<li><a href="/notes">Notes</a></li>
6161
</ul>
6262
</nav>
6363
<template id={modeTemplateId}>

src/styles/header.scss

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@
1111
.nav-list {
1212
display: flex;
1313
flex-wrap: wrap;
14-
gap: v-size(4);
1514
justify-content: center;
1615
align-items: center;
1716
height: 100%;
17+
width: 100%;
18+
}
19+
// The use of lobotomized owls instead of 'gap' on 'nav-list' is intentional
20+
// as these styles mostly take effect on older browsers where 'gap' is not
21+
// supported on Flexbox containers. On smaller screens, the alignment is not
22+
// as good as using 'gap', but it will do.
23+
.nav-list > * + * {
24+
margin-left: v-size(4);
1825
}
1926

2027
// NOTE: Change to 'm-large' when more nav items are added
@@ -26,8 +33,8 @@
2633
.logo {
2734
justify-self: start;
2835
}
29-
.nav-list {
30-
gap: v-size(6);
36+
.nav-list > * + * {
37+
margin-left: v-size(6);
3138
}
3239
}
3340
}

0 commit comments

Comments
 (0)