-
Notifications
You must be signed in to change notification settings - Fork 1
/
style-com-javascript.css
122 lines (112 loc) · 2.11 KB
/
style-com-javascript.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
:root {
font-size: 16px;
--royal-blue-light: #404eed;
--royal-blue-dark: #3946d4;
--white: #fff;
--backgroud: #e2e3e9;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
background: var(--backgroud);
}
a {
color: var(--white);
text-decoration: none;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
background: var(--royal-blue-light);
height: 4.6875rem;
padding: 1rem;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
}
.menu {
list-style: none;
display: flex;
gap: 0.5rem;
}
.menu a {
display: block;
padding: 1rem;
border-radius: 0.5rem;
}
.menu a:hover {
background: var(--royal-blue-dark);
}
.btn-menu {
display: none;
}
@media (max-width: 600px) {
.menu {
display: block;
position: absolute;
top: 4.6875rem;
left: 0;
background: var(--royal-blue-light);
text-align: center;
width: 100%;
height: 0;
z-index: 1;
visibility: hidden;
overflow-y: hidden;
transition: 0.5s;
}
.menu a {
padding: 1rem 0;
margin-inline: 1rem;
border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.16);
border-radius: 0;
}
.btn-menu {
background: none;
border: none;
font: inherit;
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--white);
padding: 1rem 0;
cursor: pointer;
}
.hamburger {
border-top: 0.125rem solid;
width: 1.25rem;
}
.hamburger::after,
.hamburger::before {
content: " ";
display: block;
width: 1.25rem;
height: 0.125rem;
background: currentColor;
margin-top: 0.3125rem;
position: relative;
transition: 0.3s;
}
.nav.active .menu {
height: calc(100vh - 4.6875rem);
visibility: visible;
overflow-y: auto;
}
.nav.active .hamburger {
border-top-color: transparent;
}
.nav.active .hamburger::before {
transform: rotate(135deg);
}
.nav.active .hamburger::after {
transform: rotate(-135deg);
top: -0.4375rem;
}
}