-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
214 lines (193 loc) · 4.83 KB
/
style.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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
@font-face {
src: url(SF-UI-Display-Bold.ttf);
font-family: SFBold;
}
/* inital styling */
*{
box-sizing: border-box;
margin: 0;
padding:0;
scroll-behavior: smooth;
}
/* styling for class navbar */
.navbar{
background: #131313;
height: 80px;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.2rem; /* 1rem = 16px */
position: sticky;
top: 0;
z-index: 10000;
}
/* outer container styling */
.navbar_container{
display:flex;
justify-content: space-between;
height: 80px;
z-index: 1;
width: 100%;
max-width: 1500px; /* to be deternmined on the acutal product, revise */
margin: 0 auto;/* auto for left & right, 0 for top & bottom, if you want to change it you can put it in format 'margin: 0 0 0 0' or 4 attribute lines*/
padding: 0 50px;
}
/* logo styling, discuss with Sarina if we need the logo or this, https://uigradients.com/#Mojito*/
#navbar_logo {
background: #5f9e76; /* fallback for old browsers */
background: -webkit-linear-gradient(to left, #108d61 , #93f9b9 ); /* Chrome 10-25, Safari 5.1-6 */
background-size: 100%;
-webkit-background-clip: text; /* https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip painted to foreground text*/
-moz-background-clip: text;
-webkit-text-fill-color: transparent;/* set to transparent*/
-moz-text-fill-color: transparent;
display:flex;
align-items: center;
cursor: pointer;
text-decoration: none;
font-size: 2.2rem;
}
/* menu styling */
.navbar_menu{
display: flex;
align-items: center;
list-style: none;
}
/* item styling */
.navbar_item{
height: 80px;
}
/* links styling */
.navbar_links{
color: #fff;
display: flex;
align-items: center;
justify-content: center;
width: 125px;
text-decoration: none;
height: 100%;
transition: all 0.3s ease;
}
/* attributes for button */
.navbar_button{
display: flex;
justify-content: center;
align-items: center;
padding: 0 1rem;
width: 100%;
}
/* attributes for button */
.button{
display: flex;
justify-content: center;
align-items: center;
text-decoration: none;
padding: 10px 20px;
height: 100%;
width: 100%;
border: none;
outline: none;
border-radius: 4px;
/* get from https://uigradients.com/ */
background: #1D976C; /* fallback for old browsers */
background: -webkit-linear-gradient(to left, #93F9B9, #1D976C); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to left, #93F9B9, #1D976C); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
color: #fff;
transition: all 0.3s ease;
}
/* hover dynamic effect */
.navbar_links:hover{
color:#93F9B9;
transition: all 0.3s ease;
}
/* breakpoint + mobile devices*/
@media screen and (max-width: 960px) {
.navbar_container {
display: flex;
justify-content: space-between;
height: 80px;
z-index: 1;
width: 100%;
max-width: 1300px;
padding: 0;
}
/* menu styling */
.navbar_menu {
display: grid;
grid-template-columns: auto;
margin: 0;
width: 100%;
position: absolute;
/* drop down effect for menu, then user clicks active for mobile ver*/
top: -1000px;
opacity: 1;
transition: all 0.5s ease;
z-index: -1;
}
/* when menu is active */
.navbar_menu.active {
background: #131313;
top: 100%;
opacity: 1;
transition: all 0.5s ease;
z-index: 99;
height: 60vh;
font-size: 1.6rem;
}
/* Styling that are repeated but with different attributes for mobile, commented in sections above so refer to the above comments */
/* position of mobile logo, may change later after discussion with sarina */
#navbar_logo {
padding-left: 25px;
}
/* toggle styling */
.navbar_toggle .bar {
width: 25px;
height: 3px;
margin: 5px auto;
transition: all 0.3s ease-in-out;
background: #fff;
}
.navbar_item {
width: 100%;
}
.navbar_links {
text-align: center;
padding: 2rem;
width: 100%;
display: table;
}
.navbar_btn {
padding-bottom: 2rem;
}
.button {
display: flex;
justify-content: center;
align-items: center;
width: 80%;
height: 80px;
margin: 0;
}
#mobile-menu {
position: absolute;
top: 20%;
right: 5%;
transform: translate(5%, 20%);
}
.navbar_toggle .bar {
display: block;
cursor: pointer;
}
/* Mobile Animations, tbh didn't fully understood it myself */
/* adding class"is-active", assign the second 'bar' in the three bar that makes menu */
#mobile-menu.is-active .bar:nth-child(2) {
opacity: 0;
}
/* 1st bar */
#mobile-menu.is-active .bar:nth-child(1) {
transform: translateY(8px) rotate(45deg);
}
/* 3rd bar */
#mobile-menu.is-active .bar:nth-child(3) {
transform: translateY(-8px) rotate(-45deg);
}
}