1
1
.nav-container {
2
+ @include text-caption;
3
+
2
4
position : fixed;
3
5
top : var (--navbar-height );
4
6
left : 0 ;
5
7
width : 100% ;
6
- font-size : calc (17 / var (--rem-base ) * 1rem );
7
8
z-index : var (--z-index-nav );
8
9
visibility : hidden;
9
10
}
16
17
17
18
@media screen and (min-width : 1024px ) {
18
19
.nav-container {
19
- /* font-size: calc(14.5 / var(--rem-base) * 1rem); */
20
20
flex : none;
21
21
position : static;
22
22
top : 0 ;
@@ -75,118 +75,78 @@ html.is-clipped--nav {
75
75
opacity : 0.75 ;
76
76
}
77
77
78
- /* .nav-panel-menu:not(.is-active)::after {
79
- content: "";
80
- background: rgba(0, 0, 0, 0.5);
81
- display: block;
82
- position: absolute;
83
- top: 0;
84
- right: 0;
85
- bottom: 0;
86
- left: 0;
87
- } */
88
-
89
78
.nav-menu {
90
79
min-height : 100% ;
91
- /* padding: 0.5rem 0.5rem 0.75rem var(--site-padding); */
92
80
line-height : var (--nav-line-height );
93
81
position : relative;
94
82
}
95
83
96
- /* .nav-menu h3.title {
97
- color: var(--nav-heading-font-color);
98
- font-size: inherit;
99
- font-weight: var(--body-font-weight-bold);
100
- margin: 0;
101
- padding: 0.25em 0 0.125em;
102
- } */
84
+ .nav-menu > .nav-list {
85
+ gap : var (--ds-space-1 );
86
+ }
103
87
104
88
.nav-list {
105
89
display : flex;
106
90
flex-direction : column;
107
91
list-style : none;
108
92
padding : 0 ;
109
- margin : 0
110
- /* margin: 0 0 0 0.75rem;
111
- padding: 0; */
93
+ margin : 0 ;
112
94
}
113
95
114
- /* .nav-menu > .nav-list + .nav-list {
115
- margin-top: 0.5rem;
116
- } */
117
-
118
96
.nav-item {
119
97
display : flex;
120
98
flex-direction : column;
121
99
}
122
100
123
- /* adds some breathing room below a nested list */
124
- /* .nav-item-toggle ~ .nav-list {
125
- padding-bottom: 0.125rem;
126
- } */
127
-
128
- /* matches list without a title */
129
- /* .nav-item[data-depth="0"] > .nav-list:first-child {
130
- display: block;
131
- margin: 0;
132
- } */
133
-
134
- .nav-item : not (.is-active ) > .nav-list {
135
- display : none;
136
- }
137
-
138
- .nav-item-toggle {
139
- background : transparent url(../ img/caret.svg) no-repeat center / 50% ;
140
- border : none;
141
- outline : none;
142
- line-height : inherit;
143
- padding : 0 ;
144
- position : absolute;
145
- height : calc (var (--nav-line-height ) * 1em );
146
- width : calc (var (--nav-line-height ) * 1em );
147
- margin-top : -0.05em ;
148
- margin-left : calc (var (--nav-line-height ) * -1em );
149
- }
150
-
151
- /* .nav-item.is-active > .nav-item-toggle {
152
- transform: rotate(90deg);
153
- } */
154
-
155
101
.nav-link ,
156
102
.nav-text {
157
- @include text-caption;
158
-
159
103
position : relative;
160
104
display : flex;
161
105
align-items : center;
162
- padding : var (--ds-space-1 ) var (--ds-space-1 ) var (--ds-space-1 ) var (--site-padding );
106
+ padding : var (--ds-space-1 ) var (--site-padding );
107
+ }
108
+
109
+ .nav-link {
163
110
transition : var (--ds-transition );
164
111
165
112
& : hover {
166
113
background : var (--ds-neutral-soft-bg );
167
114
}
168
115
116
+ & ::after {
117
+ font-family : "Material Icons Outlined" , sans-serif;
118
+ font-weight : 400 ;
119
+ content : "\e5c8" ;
120
+ position : absolute;
121
+ right : var (--ds-space-2 );
122
+ color : var (--ds-text-tertiary );
123
+ opacity : 0 ;
124
+ transition : opacity 250ms cubic-bezier (0.4 , 0 , 0.2 , 1 ) 0ms ;
125
+ }
126
+
127
+ & : hover ::after {
128
+ opacity : 1 ;
129
+ }
130
+
169
131
& : active {
170
132
background : var (--ds-neutral-soft-active-bg );
171
133
}
172
134
}
173
135
174
- .nav-link > .material-icons ,
175
- .nav-text > .material-icons {
136
+ .nav-link > .material-icons {
176
137
font-size : calc (16 / var (--rem-base ) * 1rem );
177
- margin-right : calc ( 8 / var (--rem-base ) * 1 rem );
138
+ margin-right : var (--ds-space-1 );
178
139
}
179
140
180
- li [data-depth = "1 " ] > .nav-link ,
181
- li [data-depth = "1 " ] > .nav-text {
141
+ . nav-item [data-depth = "0 " ] > .nav-link ,
142
+ . nav-item [data-depth = "0 " ] > .nav-text {
182
143
@include text-overline;
183
144
184
145
color : var (--ds-text-tertiary );
185
146
margin-top : var (--ds-space-1 );
186
147
}
187
148
188
- .is-current-page > .nav-link ,
189
- .is-current-page > .nav-text {
149
+ .is-current-page > .nav-link {
190
150
font-weight : 600 ;
191
151
background : var (--ds-neutral-soft-bg );
192
152
@@ -201,15 +161,43 @@ li[data-depth="1"] > .nav-text {
201
161
}
202
162
203
163
.secondary-nav-list {
204
- padding : 0 ;
205
164
margin : 0 ;
206
- padding-bottom : var (--ds-space-2 );
165
+ padding : var (--ds-space-2 ) 0 ;
207
166
}
208
167
209
168
.secondary-nav-list .nav-item {
210
169
color : var (--ds-text-secondary );
211
170
}
212
171
172
+ .secondary-nav-list .nav-link ::after {
173
+ content : "\e89e" ;
174
+ }
175
+
176
+ /*** nav-item toggle styles, keeping for now as we might implement again when more content is added ***/
177
+
178
+ /* .nav-item:not(.is-active) > .nav-list {
179
+ display: none;
180
+ } */
181
+
182
+ /* .nav-item-toggle {
183
+ background: transparent url(../img/caret.svg) no-repeat center / 50%;
184
+ border: none;
185
+ outline: none;
186
+ line-height: inherit;
187
+ padding: 0;
188
+ position: absolute;
189
+ height: calc(var(--nav-line-height) * 1em);
190
+ width: calc(var(--nav-line-height) * 1em);
191
+ margin-top: -0.05em;
192
+ margin-left: calc(var(--nav-line-height) * -1em);
193
+ } */
194
+
195
+ /* .nav-item.is-active > .nav-item-toggle {
196
+ transform: rotate(90deg);
197
+ } */
198
+
199
+ /*** nav-panel-explore styles, keeping for now as we might implement it elsewhere ***/
200
+
213
201
/* .nav-panel-explore {
214
202
background: var(--nav-background);
215
203
display: flex;
@@ -315,7 +303,3 @@ li[data-depth="1"] > .nav-text {
315
303
opacity: 0.9;
316
304
font-weight: var(--body-font-weight-bold);
317
305
} */
318
-
319
- /* .nav-link {
320
- padding: 1rem 0;
321
- } */
0 commit comments