-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathessential_audio.css
More file actions
182 lines (148 loc) · 5.04 KB
/
essential_audio.css
File metadata and controls
182 lines (148 loc) · 5.04 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
@charset "UTF-8";
/********** Essential Audio Player 1.0.4 CSS **********/
/****************************************/
/* */
/* Section 1: The Looks */
/* */
/****************************************/
/* 1. The Main Container */
div.essential_audio {
position: relative;
z-index: 0;
width: 100%;
}
/* 2. The Player Button – General */
div.essential_audio > div:nth-child(1) div {
width: 28px;
height: 28px;
margin-top: -13px;
border-radius: 50%;
background-color: #000;
}
div.essential_audio > div:nth-child(1) div:after {
position: absolute;
top: 7%;
left: 7%;
width: 86%;
height: 86%;
}
/* Set here how much the button exceeds the horizontal track limits: */
/* This must not be deleted! (but can be changed, of course) */
:root {
--button-protrusion: 4px;
}
/* 2.a) The Player Button – Off */
div.essential_audio > div:nth-child(1) div.off:after {
content: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><polygon fill='%23FFF' points='10,6.9 10,23.1 24,15' /></svg>");
}
/* 2.b) The Player Button – Loading */
div.essential_audio > div:nth-child(1) div.load:after {
content: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><circle opacity='0.64' fill='%23FFFFFF' cx='6.5' cy='18.5' r='2'/><circle opacity='0.76' fill='%23FFFFFF' cx='6.5' cy='11.5' r='2'/><circle opacity='0.88' fill='%23FFFFFF' cx='11.5' cy='6.5' r='2'/><circle fill='%23FFFFFF' cx='18.5' cy='6.5' r='2'/><circle opacity='0.16' fill='%23FFFFFF' cx='23.5' cy='11.5' r='2'/><circle opacity='0.28' fill='%23FFFFFF' cx='23.5' cy='18.5' r='2'/><circle opacity='0.4' fill='%23FFFFFF' cx='18.5' cy='23.4' r='2'/><circle opacity='0.52' fill='%23FFFFFF' cx='11.5' cy='23.4' r='2'/></svg>");
animation: audio_load_rotate 1s infinite linear;
}
@keyframes audio_load_rotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* 2.c) The Player Button – Playing */
div.essential_audio > div:nth-child(1) div.play {
background-color: #000!important;
}
div.essential_audio > div:nth-child(1) div.play:after {
content: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><rect fill='%23FFF' x='17' y='8' width='3' height='14' /><rect fill='%23FFF' x='10' y='8' width='3' height='14' /></svg>");
}
/* 2.d) The Player Button – Dragging */
div.essential_audio > div:nth-child(1) div.drag {
transition: left 0s!important;
/*
cursor: grab!important;
*/
}
/* 2.e) The Player Button – Error */
div.essential_audio > div:nth-child(1) div.error {
background-color: rgba(0,0,0,0.35)!important;
}
div.essential_audio > div:nth-child(1) div.error:after {
content: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path fill='%23FFF' d='M13.9,18.6c0-0.3,0-0.5,0-0.9c0-1.6,0.6-2.9,2.1-3.9l1.1-0.8c0.9-0.6,1.3-1.5,1.3-2.4c0-1.5-1-2.8-3-2.8c-2.2,0-3.1,1.6-3.1,3.2c0,0.2,0,0.4,0,0.5L10,11.9c-0.1-0.3-0.1-0.8-0.1-1.2c0-2.3,1.7-5.1,5.5-5.1c3.5,0,5.5,2.5,5.5,5c0,2-1.1,3.4-2.5,4.3l-1.2,0.8c-0.8,0.5-1.1,1.4-1.1,2.4c0,0.1,0,0.2,0,0.5H13.9z'/><path fill='%23FFF' d='M15,20.8c1,0,1.8,0.8,1.8,1.8S16,24.4,15,24.4c-1,0-1.8-0.8-1.8-1.8S14,20.8,15,20.8z'/></svg>");
}
/* 3. The Track */
div.essential_audio > div:nth-child(2) {
height: 2px;
}
div.essential_audio > div:nth-child(2):after {
content: "";
position: absolute;
z-index: 0;
background-color: #000;
opacity: 0.3;
mix-blend-mode: multiply;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
/* 4. The Loading Progress Bar */
div.essential_audio > div:nth-child(2) div {
background-color: #666;
mix-blend-mode: multiply;
}
/* 5. The Klick & Drag Sensor */
div.essential_audio > div:nth-child(3) {
height: 12px;
margin-top: -5px;
}
/****************************************/
/* */
/* Section 2: Core Values */
/* */
/****************************************/
/* 1. The Main Container + General Settings */
div.essential_audio,
div.essential_audio * {
user-select: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-overflow-scrolling: auto;
}
div.essential_audio *:focus {
outline: none;
}
/* 2. The Player Button */
div.essential_audio > div:nth-child(1) div {
position: absolute;
top: 0px;
left: 0px;
cursor: pointer;
}
/* 2.a) Container for Player Button */
div.essential_audio > div:nth-child(1) {
position: absolute;
z-index: 3;
height: 0px;
top: 0px;
left: calc(var(--button-protrusion) * -1);
width: calc(100% + (2 * var(--button-protrusion)));
}
/* 3. The Track */
div.essential_audio > div:nth-child(2) {
position: relative;
width: 100%;
overflow: hidden;
}
/* 4. The Loading Progress Bar */
div.essential_audio > div:nth-child(2) div {
position: absolute;
z-index: 1;
width: 0%;
height: 100%;
top: 0px;
left: 0px;
transition: width 0.5s;
}
/* 5. The Klick & Drag Sensor */
div.essential_audio > div:nth-child(3) {
position: absolute;
z-index: 2;
width: 100%;
top: 0px;
left: 0px;
}