-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.scss
112 lines (93 loc) · 1.64 KB
/
main.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
html {
box-sizing: border-box;
margin: 0;
padding: 0;
}
*,
*::before,
*::after{
box-sizing: inherit;
}
$dark : #171717;
$light : #fff;
body{
padding: 20px;
background-color: $dark;
}
.hamburger{
padding: 10px;
display: inline-block;
cursor: pointer;
background-color: transparent;
border: 0;
margin: 0;
}
.hamburger, .navigation {
transition: transform .3s .1s ease-in-out;
}
.hamburger--active{
transform: translateX(250px);
}
.hamburger__box{
width: 42px;
height: 24px;
display: inline-block;
position: relative;
}
.hamburger__inner{
width: 100%;
height: 3px;
background-color: $light;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
transition: background-color .1s .2s ease-in-out;
}
.hamburger__inner::before,
.hamburger__inner::after{
content: '';
width: 100%;
height: 3px;
background-color: $light;
position: absolute;
left: 0;
transition: transform .3s 0.2s ease-in-out;
}
.hamburger__inner::before{
top: -10px;
}
.hamburger__inner::after{
top: 10px;
}
.hamburger--active .hamburger__inner{
background-color: transparent;
}
.hamburger--active .hamburger__inner::before{
transform: translateY(10px) rotate(45deg);
}
.hamburger--active .hamburger__inner::after{
transform: translateY(-10px) rotate(-45deg);
}
.navigation{
height: 100vh;
width: 250px;
background-color: $light;
position: absolute;
top: 0;
left: 0;
transform: translateX(-250px);
}
.navigation--active{
transform: translateX(0px);
}
.navigation__list{
list-style: none;
margin: 50px 0 0 20px;
}
.navigation__item{
margin-bottom: 20px;
a{
text-decoration: none;
}
}