-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidenavbar.css
More file actions
164 lines (138 loc) · 2.47 KB
/
sidenavbar.css
File metadata and controls
164 lines (138 loc) · 2.47 KB
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
*{
margin: 0;
padding: 0;
font-family: 'Open sans', sans-serif;
font-size: 16px;
}
:root{
--text-color: white;
--icon-color: #F7717D;
--other1-color: #DE639A;
--other2-color: #7F2982;
--bg-color: #16001E;
}
.navbar{
width: 5rem;
min-height: 100vh;
background: var(--bg-color);
position: fixed;
transition: 0.2s;
}
.navbar:hover {
width: 15rem;
}
.navbar:hover .menu-button{
transform: translateX(0px);
}
.navbar:hover .menu-button i{
transform: rotate(-180deg);
}
.navbar:hover ul li a{
display: inline-block;
}
.navbar .menu-button{
position: fixed;
width: 15rem;
transform: translateX(-160px);
background: var(--other2-color);
transition: 0.2s;
}
.navbar .menu-button p{
color: var(--text-color);
font-size: 2rem;
padding: 1.25rem;
display: inline-block;
transition: 0.2s;
}
.navbar .menu-button i{
color: var(--text-color);
font-size: 2rem;
padding: 1.5rem;
float: right;
display: inline-block;
transform: rotate(0deg);
transition: 0.2s;
transition-delay: .2s
}
.navbar ul{
width: 100%;
}
.navbar > ul{
margin-top: 5.25rem;
}
.navbar ul li{
position: relative;
list-style: none;
display: inline-flex;
align-items: center;
width: 100%;
}
.navbar ul .hassubmenu{
align-items: baseline; /* this is align top of submenu with the top of the list of which it is submenu*/
}
.navbar ul li:hover{
background: var(--other2-color);
color: var(--text-color);
}
.navbar ul li:hover > a{
opacity: 1;
}
.navbar ul li::before{
content: '';
position: absolute;
width: 3px;
height: 56px;
background: var(--icon-color);
display: block;
opacity: 0;
left: 0px;
}
.navbar ul li a{
text-decoration: none;
padding-left: 1rem;
color: var(--text-color);
font-size: 1.5rem;
opacity: 0.2;
display: none;
transition: 0.2s ease-out;
}
.navbar ul li i{
text-decoration: none;
color: var(--icon-color);
padding: 1rem;
margin-left: 0.5rem;
font-size: 1.5rem;
transition: 0.2s ease-out;
}
.navbar ul li ul{
position: absolute;
display: block;
flex-direction: column;
min-width: 100%;
transform: translateX(15rem) scale(0);
transform-origin: 0 0;
background: var(--bg-color);
transition: 0.2s;
}
.navbar ul li i:hover{
color: var(--text-color);
}
.navbar ul li:hover > a{
opacity: 1;
}
.navbar ul li:hover ul{
transform: translateX(15rem) scale(1);
}
.navbar ul li:hover::before{
opacity: 1;
}
.main{
margin-left: 5rem;
padding: 1rem 2rem 2rem;
}
.main h1{
font-size: 2rem;
padding: 1rem 1rem 1rem 0;
font-weight: 600;
color: var(--bg-color);
}