-
Notifications
You must be signed in to change notification settings - Fork 41
/
ogx_sound.css
384 lines (321 loc) · 13.5 KB
/
ogx_sound.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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
/* Source file made available under Mozilla Public License v. 2.0 See the main repository for updates as well as full license text.
https://github.com/Godiesc/opera-gx */
@media not (-moz-bool-pref:"firefoxgx.classic-sound-icon") {
/* Favicon always visible */
.tab-icon-image:not([sharing]),
.tab-throbber {
opacity: 1 !important;
}
/* 'muted' & 'activemedia-blocked' icons hide in 'pinned' tabs */
.tab-icon-overlay[pinned]:not(:hover) {
opacity: 0 !important;
}
/* Remove audio label */
.tab-secondary-label {
display: none !important;
}
/* Favicon cropped in some situations */
/* When a tab is using microfono... */
.tab-icon-stack:not([crashed]):is([sharing][soundplaying]) {
& :is(.tab-icon-pending, .tab-icon-image, .tab-sharing-icon-overlay) {
mask-image: url("../icons/tab_icon_masks.svg#SoundMask") !important;
}
}
/* tab on hover, and when it is 'muted' or 'media blocked' */
.tabbrowser-tab:hover {
& .tab-icon-stack:not([crashed]):is([muted],[activemedia-blocked]) {
& :is(.tab-icon-pending, .tab-icon-image, .tab-sharing-icon-overlay) {
mask-image: url("../icons/tab_icon_masks.svg#SoundMask") !important;
}
}
}
/* In 'pinned' tabs when sound playing */
.tab-icon-stack[pinned]:not([crashed]):is([soundplaying]) {
& :is(.tab-icon-pending, .tab-icon-image, .tab-sharing-icon-overlay) {
mask-image: url("../icons/tab_icon_masks.svg#SoundMask") !important;
}
}
/* Move the tab label to make gap for the sound icon and give it a slight animation */
.tab-throbber, .tab-icon-pending, .tab-icon-image, .tab-sharing-icon-overlay, .tab-icon-overlay {
#tabbrowser-tabs:is([orient="horizontal"], [orient="vertical"][expanded]) &:not([pinned]) {
transition: margin-inline 200ms ease-in-out !important;
}
}
/* Icons Styles */
.tab-icon-overlay {
&:not([crashed]) {
/* Playing, Muted & blocked */
&:is([soundplaying], [muted], [activemedia-blocked]) {
border-color: transparent !important;
background-size: 14px 14px !important;
background-color: color-mix(in srgb, var(--contrast-color), transparent) !important;
padding: 0px !important;
}
/* Playing */
&[soundplaying] {
--tab-icon-end-margin: 20px !important; /* Rightmost tab label */
background-image: url("chrome://browser/skin/tabbrowser/tab-audio-blocked-small.svg") !important;
box-shadow: inset 0 0 0 1px var(--general-color), inset 0 0 0 0.1px var(--general-color) !important;
inset-inline-end: -18px !important;
fill: var(--general-color) !important;
opacity: 1 !important;
&:hover{
fill: var(--lwt-tab-text) !important;
box-shadow: inset 0 0 0 1px var(--lwt-tab-text), inset 0 0 0 0.1px var(--lwt-tab-text) !important;
opacity: 0.9 !important;
}
}
/* Muted & blocked */
&:is([muted],[activemedia-blocked]) {
/*--tab-icon-end-margin: 8px !important; /* Rightmost tab label */
background-image: url("../icons/paused.svg") !important;
height: 14px !important;
width: 14px !important;
box-shadow: inset 0 0 0 1px var(--lwt-tab-text), inset 0 0 0 0.1px var(--lwt-tab-text) !important;
top: -5px;
inset-inline-end: -7px !important;
&:not([pinned]):hover{
background-image: url("chrome://browser/skin/tabbrowser/tab-audio-blocked-small.svg") !important;
}
}
/* Just Muted */
&[muted] {
background-image: url("../icons/paused.svg") !important;
}
/* Just blocked */
&[activemedia-blocked]{
background-image: url("../icons/blocked.svg") !important;
box-shadow: none !important;
fill: var(--icon-color-critical) !important;
}
/* When sharing */
&[sharing]{
--tab-icon-end-margin: initial !important;
}
}
}
/* Opacity of mute icon */
.tabbrowser-tab:hover {
.tab-icon-overlay {
&:not([crashed]) {
&:is([muted],[activemedia-blocked]) {
opacity: 0.7 !important;
&:hover{
opacity: 0.9 !important;
}
}
}
}
}
/* Unified styles for 'pinned' tabs */
.tab-icon-overlay {
&:not([indicator-replaces-favicon]) {
&:is([soundplaying], [muted], [activemedia-blocked]) {
height: 14px !important;
width: 14px !important;
top: -5px !important;
inset-inline-end: -7px !important;
}
}
}
/* Hide [mute] icon when tab loads */
.tabbrowser-tab[busy]:hover .tab-icon-overlay:not([pinned]),
.tabbrowser-tab[busy][pinned]:hover .tab-icon-overlay {
opacity: 0 !important;
}
/* _____________ Some fixes for 'Sound icon' in 'vertical tabs' */
#tabbrowser-arrowscrollbox:is([orient="vertical"]) {
/* Hide muted icon */
& .tabbrowser-tab:not(:hover) .tab-icon-overlay:not([pinned]):is([muted]){
opacity: 0 !important;
}
/* Hide favicon corner for 'playing' button */
& .tabbrowser-tab .tab-icon-stack:not([crashed]):is([soundplaying]) :is(.tab-icon-pending, .tab-icon-image, .tab-sharing-icon-overlay) {
mask-image: url("../icons/tab_icon_masks.svg#SoundMask") !important;
}
/* Label margin reseted */
& .tab-icon-overlay[soundplaying]:not([pinned]){
--tab-icon-end-margin: 0px !important;
}
}
/* The 'rhythm animation' only works when you don't use 'tab-shapes' config
tab[soundplaying]:not([pinned]) .tab-background::before{
content: "" !important;
display: block !important;
position: absolute !important;
}
@media (prefers-color-scheme: dark){
tab[soundplaying]:not([pinned]) .tab-background::before{
background: url("../icons/Beats.webp") no-repeat left center !important;
background-size: 22px 16px !important;
width: 22px !important;
height: 16px !important;
margin-inline-start: 3px !important;
margin-block-start: calc(var(--tab-height-personal)/2 - 1px) !important;
}}
@media (prefers-color-scheme: light){
tab[soundplaying]:not([pinned]) .tab-background::before{
background: url("../icons/Beats.gif") repeat left center !important;
background-size: 16px 16px !important;
margin-inline-start: 3px !important;
margin-block-start: calc(var(--tab-height-personal)/2 + 3px) !important;
width: 20px !important;
height: 10px !important;
}}*/
}
/* ________________________________________________ Classic Sound icon ________________________________________________*/
@media (-moz-bool-pref:"firefoxgx.classic-sound-icon") {
/* 'muted' & 'activemedia-blocked' icons hide in 'pinned' tabs */
.tab-icon-overlay[pinned]:not(:hover) {
opacity: 0 !important;
}
/* Favicon hidden when hover in pinned tabs when playing-muted-blocked */
.tabbrowser-tab[pinned]:is([soundplaying], [muted], [activemedia-blocked]):hover .tab-icon-image {
opacity: 0 !important;
}
/* Remove audio label */
.tab-secondary-label {
display: none !important;
}
/* Compatibilidad con compact mode */
:root[uidensity="compact"] {
& .tab-icon-image{
opacity: 1 !important;
}
& tab[muted]:hover .tab-icon-image{
opacity: 0 !important;
}
& tab[muted]:not(:hover) .tab-icon-overlay{
opacity: 0 !important;
}
}
.tab-icon-overlay {
&:not([crashed]) {
/* Playing, Muted & blocked */
&:is([soundplaying], [muted], [activemedia-blocked]) {
border-color: transparent !important;
background-size: 16px 16px !important;
background-color: transparent !important;
padding: 0px !important;
border-radius: 2px !important;
}
}
}
/* Icons Styles tab not 'hover' */
.tabbrowser-tab:not(:hover) .tab-icon-overlay {
&:not([crashed]) {
/* Playing */
&[soundplaying] {
background-image: var(--my-beats-image) !important;
width: 100% !important;
background-size: 22px 16px !important;
inset-block-start: calc(var(--tab-height-personal)/2 - 6px) !important;
inset-inline-start: -3px !important;
opacity: 1 !important;
}
/* Playing in Pinned tab */
&[soundplaying][pinned] {
width: -moz-available !important;
margin-inline: -3px !important;
inset-inline-start: 0px !important;
}
&[sharing]{
inset-inline-start: -2px !important;
}
}
}
/* Icons Styles tab is 'hover' */
.tabbrowser-tab:is(:hover) .tab-icon-overlay {
opacity: 1 !important;
&:not([crashed]) {
&:hover{
outline: 1px solid var(--identity-icon-color, var(--general-color)) !important;
border-radius: 1px !important;
}
/* Playing, Muted & blocked */
&:is([soundplaying],[muted],[activemedia-blocked]) {
background-color: var(--identity-icon-color, var(--general-color)) !important;
fill: var(--contrast-color) !important;
}
/* Playing-Muted in Pinned tab */
&:is([soundplaying],[muted],[activemedia-blocked])[pinned] {
inset-block-start: initial !important;
inset-inline: initial !important;
}
/* Muted */
&[muted] {
background-image: url("../icons/muted.svg") !important;
fill: var(--lwt-tab-text) !important;
background-color: transparent !important;
&:hover{
background-image: url("chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg") !important;
background-color: color-mix(in srgb, var(--button-bgcolor) 85%, white) !important;
outline-color: transparent !important;
}
}
&[activemedia-blocked]{
background-color: var(--lwt-tab-text) !important;
&:hover{
background-color: var(--identity-icon-color, var(--general-color)) !important;
}
}
/* When sharing */
&[sharing]{
border-radius: 2px !important;
inset-block-start: initial !important;
inset-inline: initial !important;
}
}
}
/* Playin 'beats' image for dark and light themes */
@media (prefers-color-scheme: dark){
.tabbrowser-tab:not(:hover):not([crashed]) .tab-icon-overlay:is([soundplaying]) {
--my-beats-image: url("../icons/Beats.webp") !important;
}
}
@media (prefers-color-scheme: light){
.tabbrowser-tab:not(:hover):not([crashed]) .tab-icon-overlay:is([soundplaying]) {
--my-beats-image: url("../icons/Beats.gif") !important;
background-size: 16px 16px !important;
inset-block-start: 13px !important;
}
}
/* Hide [mute] icon when tab loads */
.tabbrowser-tab[busy]:hover .tab-icon-overlay:not([pinned]),
.tabbrowser-tab[busy][pinned]:hover .tab-icon-overlay {
opacity: 0 !important;
}
/* ________________________________ Some fixes for 'Sound icon' in 'vertical tabs' ________________________________ */
@media (-moz-bool-pref:"sidebar.verticalTabs") {
/* Hide Muted & Blocked icon */
& .tabbrowser-tab:not(:hover) .tab-icon-overlay:not([pinned]):is([muted],[activemedia-blocked]){
opacity: 0 !important;
}
/* Hide favicon when 'hover' in a tab playing-muted-blocked */
& .tabbrowser-tab:is([soundplaying], [muted], [activemedia-blocked]):hover .tab-icon-image {
opacity: 0 !important;
}
/* PLaying 'beats' size fixed when sidebar is not expanded and when is expanded */
.tabbrowser-tab:not(:hover) .tab-icon-overlay {
&:not([crashed]) {
/* Playing */
&[soundplaying] {
width: 22px !important;
margin-inline: -3px !important;
inset-inline-start: 0px !important;
}
}
}
/* Correct sound icon position */
.tab-icon-overlay {
opacity: 1 !important;
&:not([crashed]) {
/* Playing, Muted & blocked */
&:is([soundplaying],[muted],[activemedia-blocked]) {
inset-block-start: initial !important;
inset-inline: initial !important;
}
}
}
}
}