-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
159 lines (140 loc) · 3.11 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
/* GREY BACKGROUND WITH NO MARGIN */
body{
background: darkgrey;
height: 2000px;
margin: 0;
}
a{
text-decoration: none;
font: bold 18px 'segoe ui';
color: grey
}
/* WHITE HEADER */
header{
background: white;
height: 70px;
margin: auto;
}
/* #DROPDOWNMENU IS THE MAIN BLOCK WHICH INCLUDE :
- HIDDEN CHECKBOX (OPACITY 0%)
- VISIBLE TOGGLE BUTTON
- VISIBLE BUTTON ANIMATION (TOP, MIDDLE, BOTTOM BAR)
- LIST BLOCK INCLUDING LIST ELEMENT*/
#dropdownmenu{
position: fixed;
width: 150px;
right: 20px;
top: 20px;
height: 36px;
}
#dropdownmenu .list{
position: relative;
margin: auto;
width: auto;
background: none;
top: -30px;
display: flex;
flex-direction: column;
gap: 3px;
}
.list_element{
display: flex;
position: relative;
justify-content: center;
align-items: center;
background: white;
width: 150px;
border-radius: 5px;
height: 35px;
box-shadow: 0px 0px 2px grey;
transition-duration: 2s;
}
.list_element:hover, .list_element:active{
transform: none;
background: #f2bc52;
color: white;
transition-duration: .2s;
}
/* VISIBLE BUTTON AND CHECKBOX SHARE THE SAME SIZE AND POSITION
SET CHECKBOX OPACITY TO 1 TO SEE IT */
#visible_button{
display: flex;
flex-wrap: nowrap;
flex-direction: column;
justify-content: space-between;
position: relative;
top: -43px;
left: 112px;
height: 26px;
width: 28px;
z-index: 10;
background: rgba(255, 255, 255, 0.7);
padding: 5px;
border-radius: 4px;
}
#checkbox {
width: 38px;
height: 36px;
z-index: 9999;
position: relative;
left: 108px;
top: -3px;
opacity: 0;
cursor: pointer; /* SET POINTER TO GET THE STANDARD LINK HOVER */
}
/* ELEMENTS OF ANIMATION */
#top_bar{
position:relative;
height: 4px;
width: 28px;
border-radius: 2px;
background: #f2bc52;
box-shadow: 1px 1px 2px grey;
transition-duration: 1s;
}
#middle_bar{
height: 4px;
width: 28px;
border-radius: 2px;
background: #f2bc52;
box-shadow: 1px 1px 2px grey;
transition-duration: .5s;
}
#bottom_bar{
position:relative;
height: 4px;
width: 28px;
border-radius: 2px;
background: #f2bc52;
box-shadow: 1px 1px 2px grey;
transition-duration: 1s;
}
/* ANIMATION */
#checkbox:not(:checked) ~ #visible_button #top_bar{
transform: rotate(45deg) translate(7.5px, 7.5px);
background: grey;
transition-delay: .5s;
box-shadow: 1.5px 0.25px 2px grey;
}
#checkbox:not(:checked) ~ #visible_button #bottom_bar{
transform: rotate(-45deg) translate(8px, -8px);
background: grey;
transition-delay: .5s;
box-shadow: -1px 1px 2px grey;
}
#checkbox:not(:checked) ~ #visible_button #middle_bar{
opacity: 0;
}
#checkbox:checked ~ #middle_bar{
transition-delay: 1s;
}
/* HIDE LIST BLOCK WHEN CHECKBOX IS CHECKED AND VICE VERSA */
#checkbox:checked ~ .list{
visibility: hidden;
opacity: 0;
transition-duration: .5s;
}
#checkbox:not(:checked) ~ .list{
visibility: visible;
transition-duration: .5s;
}