-
-
Notifications
You must be signed in to change notification settings - Fork 229
/
Copy pathSiteNavigation.scss
214 lines (201 loc) · 5.75 KB
/
SiteNavigation.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
.site-navigation-root {
.overlay {
@include overlay;
z-index: $zindex-lightbox - 1;
}
}
.site-navigation {
position: relative;
z-index: $zindex-lightbox;
border-bottom: $header-border-height solid $vermillion;
background-color: $oxford-blue;
@include sm-only {
.wrapper {
padding-left: 16px;
padding-right: 16px;
}
}
}
.site-navigation-bar {
position: relative;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
@include column-gap(16px);
padding-top: 12px;
padding-bottom: 12px;
@include sm-up {
@include column-gap(24px);
}
.SiteNavigationToggle--mobile-menu {
flex: 1; // center owid logo
> button {
@include mobile-toggle-icon;
color: $white;
&:hover {
color: $blue-40;
}
}
}
.site-primary-links {
> ul {
display: flex;
flex-direction: row;
@include column-gap(24px);
align-items: center;
> li {
list-style-type: none;
white-space: nowrap;
> a,
.SiteNavigationToggle__button {
@include body-3-medium;
color: $blue-20;
&:hover {
color: $blue-40;
}
}
}
}
.with-relative-dropdown {
position: relative;
.SiteNavigationToggle__caret {
margin-left: 8px;
}
.SiteNavigationToggle__dropdown {
position: absolute;
top: 100%;
width: 330px;
margin-top: $vertical-spacing;
margin-left: -40px;
padding: 24px 40px;
background-color: $accent-pale-blue;
ul {
display: flex;
flex-direction: column;
row-gap: 8px;
li {
list-style-type: none;
a {
display: block;
padding: 8px 0;
@include body-3-medium;
color: $blue-90;
&:hover {
color: $blue-50;
}
}
}
}
}
}
}
.site-search-cta {
display: flex;
flex-direction: row;
flex-grow: 1;
align-items: center;
justify-content: end;
height: $search-cta-height;
@include column-gap(16px);
@include sm-only {
flex: 1; // center owid logo
}
.SiteNavigationToggle.newsletter-subscription {
@include sm-only {
// when the donate button is hidden, it still captures the
// :last-child selector of the column-gap mixin of the parent
// container so the margin-right: 0 is not applied and needs to
// be applied manually here
margin-right: 0;
}
.SiteNavigationToggle__button {
color: $white;
&:hover {
color: $blue-40;
}
@include lg-down {
@include mobile-toggle-icon;
}
@include lg-up {
height: $search-cta-height;
padding: 0 24px;
@include body-3-medium;
border: 1px solid $white;
&:hover {
color: $blue-90;
background-color: $white;
}
&.active {
color: $blue-90;
background-color: $blue-20;
border-color: $blue-20;
}
}
}
.NewsletterSubscriptionForm__header {
@include h3-bold;
color: $blue-60;
margin: 0;
}
.SiteNavigationToggle__dropdown {
position: absolute;
top: calc(100% + $header-border-height);
right: 0;
width: 411px; // see popover-box-styles mixin
@include sm-only {
margin-right: -16px;
width: 100vw;
padding: 16px;
}
padding: 32px 40px;
background-color: $accent-pale-blue;
}
}
a.donate {
display: flex;
@include sm-only {
display: none;
}
align-items: center;
height: $search-cta-height;
color: $white;
@include body-3-medium;
padding: 0 24px;
background-color: $vermillion;
&:hover {
background-color: $accent-vermillion;
}
}
}
&.search-active {
.site-primary-links {
display: none;
}
@include sm-only {
.site-logos {
display: none;
}
}
@include lg-down {
.site-search-cta {
flex: 1 1 100%;
}
}
}
}
.site-navigation__giving {
@include body-3-medium;
display: block;
width: 100%;
text-align: center;
padding: 2px 0 5px;
color: $white;
background-color: $vermillion;
&:hover {
text-decoration: underline;
}
@include sm-only {
display: none;
}
}