-
Notifications
You must be signed in to change notification settings - Fork 170
/
Copy pathHeader.module.css
193 lines (162 loc) · 3.94 KB
/
Header.module.css
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
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 2rem 4rem;
background-color: rgba(45, 45, 45, .98);
position: fixed; /* Set the navbar to fixed position */
top: 0; /* Position the navbar at the top of the page */
box-sizing: border-box;
width: 100%;
z-index: 1; /* Make sure everything scrolls behind the nav bar */
}
.header li {
list-style: none;
color: var(--color-text-secondary);
margin-top: 2rem;
}
.mobile_nav_menu {
display: flex;
flex-direction: column;
width: 80vw;
position: fixed;
inset: 0 0 0 30%;
z-index: 1000;
padding: 2rem 2rem 2rem 6rem;
background: var(--color-background);
box-shadow: -4px 4px 12px rgba(0, 0, 0, 0.25);
}
.menu_bar_container {
flex-direction: column;
}
.menu_bar {
width: 35px;
height: 5px;
background-color: #FFFFFF;
margin: 3px 0;
}
.mobile_nav_bar_close_container {
display: flex;
flex-direction: row;
justify-content: flex-end;
width: 100%;
}
.mobile_nav_bar_close_button {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
margin-right: 20vw;
margin-top: 5rem;
background-color: var(--color-light-background);
border-radius: 5px;
width: 30px;
height: 30px;
}
.mobile_nav_menu_hidden {
display: none;
}
.desktop_right_nav_bar {
display: none;
}
@media only screen and (min-width: 50em) {
.header {
padding-top: 1.5rem;
padding-bottom: 2rem;
}
.desktop_left_nav_bar,
.desktop_right_nav_bar {
display: flex;
}
.desktop_left_nav_bar {
align-items: center;
}
.desktop_left_nav_bar li,
.desktop_left_nav_bar div {
/*
Turns the list horizontal instead of vertical default.
Using inline-block instead of just inline makes the nav dropdown
hover triggers work properly
*/
display: inline-block;
line-height: 1.375rem;
margin-top: 0;
}
.desktop_menu_items {
display: flex;
flex-direction: row;
justify-content: space-between;
overflow-x: hidden;
overflow-y: hidden;
}
.dropdown_container {
display: flex;
flex-direction: column;
cursor: pointer;
}
.dropdown {
display: flex;
visibility: hidden;
flex-direction: column;
text-align: start;
position: absolute;
z-index: 1;
background-color: var(--color-background);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
padding: 1rem 1rem;
opacity: 0;
transition: opacity 0.25s ease;
border-radius: 5px;
}
.dropdown_item {
display: flex !important;
flex-direction: column;
width: 100%;
align-items: flex-start;
}
.dropdown_item:hover div,
.dropdown_item:hover p {
color: var(--color-purple) !important;
}
.dropdown_item_row {
font-size: .8rem;
display: flex !important;
flex-direction: row;
justify-content: flex-start;
width: 100%;
align-items: center;
}
.dropdown_item_row * + * {
margin-left: 1rem;
}
.dropdown_item_subtext {
margin-left: 0;
margin-top: 0.5rem;
font-size: .7rem;
}
.dropdown li {
padding: 0;
}
.dropdown li + li {
margin-top: 1rem;
}
.dropdown_container:hover .dropdown,
.dropdown:hover {
visibility: visible;
opacity: 1;
}
.dropdown > * + * {
margin-left: 0;
}
.nav_item {
margin-left: 2.5rem;
}
.dropdown_anchor_container > span {
/*
Since the image tag comes with a default margin,
we need to apply !important to apply our own margins
*/
margin-bottom: 2px !important;
margin-left: 2px !important;
}
}