Skip to content

Commit 40f59e2

Browse files
committed
mobile menu text styles
1 parent cf80e13 commit 40f59e2

3 files changed

Lines changed: 61 additions & 14 deletions

File tree

src/components/Nav/JumpToLinks.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const JumpToLinks = ({
2626
tabIndex={-1}
2727
>
2828
<span>{heading}</span>
29-
<div class="pt-xs">
29+
<div class="pt-[6px]">
3030
<Icon kind={isOpen ? "chevron-up" : "chevron-down"} />
3131
</div>
3232
</button>
@@ -35,10 +35,7 @@ export const JumpToLinks = ({
3535
{links?.map((link) => (
3636
<li
3737
key={link.label}
38-
class={`
39-
${link.size === "small" ? "text-body-caption" : "text-body capitalize"}
40-
${link.current ? "underline" : ""}
41-
`}
38+
class={`${styles.linklabel} ${link.size ?? ""} ${link.current ? "current" : ""}`}
4239
>
4340
<a href={link.url}>{link.label}</a>
4441
</li>

src/components/Nav/MainNavLinks.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,7 @@ export const MainNavLinks = ({
4242
<Logo />
4343
</a>
4444

45-
<button
46-
class={styles.toggle}
47-
onClick={handleToggle}
48-
aria-hidden="true"
49-
tabIndex={-1}
50-
>
45+
<button onClick={handleToggle} aria-hidden="true" tabIndex={-1}>
5146
<div class={styles.mobileMenuLabel}>
5247
{isOpen ? (
5348
<Icon kind="close" />

src/components/Nav/styles.module.scss

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import "/styles/variables.scss";
2+
@import "/styles/global.scss";
23

34
.container {
45
height: fit-content;
@@ -39,6 +40,13 @@
3940
height: unset;
4041
}
4142

43+
ul {
44+
font-size: 1.5rem;
45+
line-height: 1.167;
46+
-webkit-text-stroke-width: 0.15px;
47+
margin-bottom: var(--spacing-xs);
48+
}
49+
4250
@media (min-width: $breakpoint-tablet) {
4351
display: grid;
4452
grid-auto-flow: column;
@@ -58,11 +66,14 @@
5866
display: flex;
5967
gap: var(--spacing-xs);
6068
padding: 0;
61-
margin-bottom: var(--spacing-xs);
69+
margin-bottom: 10px;
6270
}
6371

6472
ul {
6573
grid-column: 1 / 2;
74+
font-size: 1.25rem;
75+
line-height: 1.2;
76+
-webkit-text-stroke-width: 0.15px;
6677
}
6778

6879
&:global(.open),
@@ -81,13 +92,14 @@
8192
top: -0.25rem;
8293

8394
svg {
84-
height: 1.25rem;
85-
width: 1.25rem;
95+
height: 1rem;
96+
width: 1rem;
8697
}
8798
@media (min-width: $breakpoint-tablet) {
8899
display: none !important;
89100
}
90101
}
102+
91103
.desktopMenuLabel {
92104
display: none;
93105
@media (min-width: $breakpoint-tablet) {
@@ -130,6 +142,10 @@
130142
display: grid;
131143
grid-template-columns: 1fr 1fr;
132144
padding: var(--spacing-sm) 1.25rem;
145+
font-size: 1.5rem;
146+
line-height: 1.167;
147+
-webkit-text-stroke-width: 0.15px;
148+
max-height: 300px;
133149

134150
/* Hide scrollbar */
135151
// Chrome, Safari, Edge, Opera
@@ -165,10 +181,17 @@
165181
ul {
166182
padding-bottom: var(--spacing-md);
167183
display: inline-block;
184+
font-size: 1rem;
185+
line-height: 1.25;
186+
-webkit-text-stroke-width: 0.05px;
168187
}
169188
}
170189
}
171190

191+
:global(.reference-item) .jumpto ul {
192+
grid-template-columns: 1fr;
193+
}
194+
172195
.buttonlink {
173196
display: flex;
174197
width: 100%;
@@ -182,6 +205,38 @@
182205
color: var(--sidebar-bg-color);
183206
text-decoration: none;
184207
}
208+
font-size: 1.5rem;
209+
line-height: 1.167;
210+
-webkit-text-stroke-width: 0.15px;
211+
212+
@media (min-width: $breakpoint-tablet) {
213+
font-size: 1.25rem;
214+
line-height: 1.2;
215+
-webkit-text-stroke-width: 0.15px;
216+
}
217+
}
218+
219+
.linklabel {
220+
&:global(.current) {
221+
text-decoration-line: underline;
222+
}
223+
224+
&:not(:global(.small)) {
225+
font-size: 1.5rem;
226+
line-height: 1.167;
227+
-webkit-text-stroke-width: 0.15px;
228+
}
229+
&:global(.small) {
230+
@extend .text-body;
231+
}
232+
233+
@media (min-width: $breakpoint-tablet) {
234+
&:not(&:global(.small)) {
235+
font-size: 1.25rem;
236+
line-height: 1.2;
237+
-webkit-text-stroke-width: 0.15px;
238+
}
239+
}
185240
}
186241

187242
/* Interaction */

0 commit comments

Comments
 (0)