-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
174 lines (147 loc) · 3.14 KB
/
styles.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
display: flex;
align-items: center;
background-color: black;
}
.video-container {
position: relative;
width: 100%;
max-height: 100vh;
object-fit: contain;
display: flex;
min-width: 0;
justify-content: center;
margin-inline: auto;
border: 1px solid magenta;
}
video {
width: 100%;
}
.video-controls-container {
position: absolute;
bottom: 0;
left: 0;
right: 0;
color: white;
z-index: 100;
opacity: 0;
transition: opacity 150ms ease-in-out;
}
.chromeos-theme {
margin: 10px 10px;
padding: 5px 0px;
border: 2px solid rgba(45, 45, 45, .9);
border-radius: 500px;
/*fallback color*/
background-color: rgb(30, 30, 30);
background-color: rgba(30, 30, 30, .9);
backdrop-filter: blur(8px);
}
.youtube-theme {
margin: 0px 0px;
padding: 0px 0px;
}
.youtube-theme::before {
content: "";
position: absolute;
bottom: 0;
background: linear-gradient(to top, black, transparent);
width: 100%;
aspect-ratio: 6/1;
z-index: -1;
pointer-events: none;
}
.video-container:hover .video-controls-container,
.video-container:focus-within .video-controls-container,
.video-container.paused .video-controls-container {
opacity: 1;
}
.video-controls-container .controls {
display: flex;
padding: .25rem .75rem;
justify-content: space-between;
align-items: center;
}
.left-controls-container,
.center-controls-container,
.right-controls-container {
display: flex;
gap: .75rem;
}
.left-controls-container,
.right-controls-container {
flex: 1;
}
.right-controls-container {
justify-content: flex-end;
}
.video-controls-container .controls button {
background: none;
border: none;
/* border: 1px solid red; */
color: inherit;
padding: 0;
height: 36px;
width: 36px;
font-size: 1rem;
cursor: pointer;
opacity: .8;
transition: opacity 150ms ease-in-out;
}
.video-controls-container .controls button:hover {
opacity: 1;
}
.video-container.paused .pause-icon {
display: none;
}
.video-container:not(.paused) .play-icon {
display: none;
}
.video-container.fullscreen .fscr-icon {
display: none;
}
.video-container:not(.fullscreen) .fscr-close-icon {
display: none;
}
.vol-high-icon,
.vol-low-icon,
.vol-mute-icon {
display: none;
}
.video-container[data-volume-level="high"] .vol-high-icon {
display: block;
}
.video-container[data-volume-level="low"] .vol-low-icon {
display: block;
}
.video-container[data-volume-level="muted"] .vol-mute-icon {
display: block;
}
.volume-container {
display: flex;
align-items: center;
}
.volume-slider {
width: 0;
margin: 5px;
transform-origin: left;
transform: scaleX(0);
transition: width 150ms ease-in-out, transform 150ms ease-in-out;
}
.volume-container:hover .volume-slider,
.volume-slider:focus-within {
width: 100px;
transform: scaleX(1);
}
.video-controls-container.chromeos-theme .youtube-icon {
display: none;
}
.video-controls-container.youtube-theme .chromeos-icon {
display: none;
}