Skip to content

Commit e03dfc6

Browse files
authored
fix(UI): Change to use legacy css format to support old TVs (#7658)
Related to #7419 See: Space-separated rgb() parameters --> https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb#browser_compatibility
1 parent 46ab1cb commit e03dfc6

8 files changed

+26
-25
lines changed

.csslintrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"selector-list-comma-newline-after": "always-multi-line",
2020
"selector-no-vendor-prefix": null,
2121
"selector-pseudo-element-colon-notation": "single",
22-
"unit-allowed-list": ["em", "%", "px", "s", "deg", "vmin", "ms", "vh"]
22+
"unit-allowed-list": ["em", "%", "px", "s", "deg", "vmin", "ms", "vh"],
23+
"color-function-notation": "legacy"
2324
}
2425
}

demo/demo.less

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@drawer-width: 550px;
1818

1919
@mdl-footer-link-color: #9e9e9e; /* copied from MDL stylesheet */
20-
@mdl-button-color: rgb(63 81 181); /* copied from MDL stylesheet */
20+
@mdl-button-color: rgb(63, 81, 181); /* copied from MDL stylesheet */
2121

2222
@progress-circle-size: 45px;
2323
@progress-circle-thickness: 5px;
@@ -74,7 +74,7 @@ main.mdl-layout__content {
7474
/* Give the button a round background, meant to look like the play button. */
7575
border-radius: 50%;
7676
color: #000;
77-
background: rgba(255 255 255 / 85%);
77+
background: rgba(255, 255, 255, 85%);
7878
}
7979

8080
html, body {

ui/less/ad_controls.less

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,18 @@
9595

9696
.shaka-skip-ad-button {
9797
padding: 5px 15px;
98-
background: rgba(0 0 0 / 70%);
98+
background: rgba(0, 0, 0, 70%);
9999
border: none;
100100

101101
&:disabled {
102-
background: rgba(0 0 0 / 30%);
102+
background: rgba(0, 0, 0, 30%);
103103
}
104104

105105
cursor: pointer;
106106
}
107107

108108
.shaka-skip-ad-counter {
109109
padding: 5px;
110-
background: rgba(0 0 0 / 70%);
110+
background: rgba(0, 0, 0, 70%);
111111
margin: 0;
112112
}

ui/less/buttons.less

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
border-radius: 50%;
3939

4040
/* A small drop shadow below the button. */
41-
box-shadow: rgba(0 0 0 / 10%) 0 0 20px 0;
41+
box-shadow: rgba(0, 0, 0, 10%) 0 0 20px 0;
4242

4343
/* No border. */
4444
border: none;
@@ -51,7 +51,7 @@
5151
background-position: center center;
5252

5353
/* A background color behind the play arrow. */
54-
background-color: rgba(255 255 255 / 90%);
54+
background-color: rgba(255, 255, 255, 90%);
5555

5656
.show-when-controls-shown();
5757

@@ -127,10 +127,10 @@
127127
border: none;
128128

129129
/* Setting text color to white */
130-
color: rgb(255 255 255);
130+
color: rgb(255, 255, 255);
131131

132132
/* Setting background color to black so white text can be seen clearly */
133-
background-color: rgb(0 0 0 / 50%);
133+
background-color: rgb(0, 0, 0, 50%);
134134

135135
cursor: default;
136136
font-size: 20px;

ui/less/containers.less

+7-7
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
min-width: 300px;
223223

224224
color: white;
225-
background-color: rgba(35 35 35 / 90%);
225+
background-color: rgba(35, 35, 35, 90%);
226226

227227
font-size: 14px;
228228

@@ -243,7 +243,7 @@
243243
}
244244

245245
span {
246-
color: rgb(150 150 150);
246+
color: rgb(150, 150, 150);
247247
}
248248
}
249249

@@ -254,7 +254,7 @@
254254
min-width: 150px;
255255

256256
color: white;
257-
background-color: rgba(35 35 35 / 90%);
257+
background-color: rgba(35, 35, 35, 90%);
258258

259259
font-size: 14px;
260260

@@ -275,12 +275,12 @@
275275
}
276276

277277
span {
278-
color: rgb(150 150 150);
278+
color: rgb(150, 150, 150);
279279
}
280280
}
281281

282282
.shaka-context-menu {
283-
background-color: rgba(35 35 35 / 90%);
283+
background-color: rgba(35, 35, 35, 90%);
284284

285285
border-radius: 2px;
286286

@@ -300,7 +300,7 @@
300300
cursor: pointer;
301301

302302
&:hover {
303-
background-color: rgba(50 50 50 / 90%);
303+
background-color: rgba(50, 50, 50, 90%);
304304
}
305305
}
306306

@@ -406,7 +406,7 @@
406406

407407
/* Add a bit of a white shadow to keep our black spinner visible
408408
on a black background. */
409-
filter: drop-shadow(0 0 2px rgba(255 255 255 / 50%));
409+
filter: drop-shadow(0 0 2px rgba(255, 255, 255, 50%));
410410
}
411411

412412
.shaka-hidden-fast-forward-container,

ui/less/overflow_menu.less

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/* Styles for the menu itself. */
2020
background: white;
21-
box-shadow: 0 1px 9px 0 rgba(0 0 0 / 40%);
21+
box-shadow: 0 1px 9px 0 rgba(0, 0, 0, 40%);
2222
border-radius: 2px;
2323
max-height: 250px;
2424
min-width: 180px;
@@ -53,7 +53,7 @@
5353

5454
/* When hovered, the button's background is highlighted. */
5555
&:hover {
56-
background: rgb(224 224 224);
56+
background: rgb(224, 224, 224);
5757
}
5858

5959
/* The button is clickable, showing cursor pointer */
@@ -65,7 +65,7 @@
6565
}
6666

6767
.shaka-keyboard-navigation &:focus {
68-
background: rgb(224 224 224);
68+
background: rgb(224, 224, 224);
6969
}
7070
}
7171

@@ -110,7 +110,7 @@
110110
* language, the currently-selected resolution, etc. */
111111
.shaka-current-selection-span {
112112
/* This is dimmer than the other span, which is the name of the submenu. */
113-
color: rgba(0 0 0 / 54%);
113+
color: rgba(0, 0, 0, 54%);
114114
}
115115

116116
/* The submenus have somewhat different margins inside them. */

ui/less/thumbnails.less

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#shaka-player-ui-thumbnail-container {
22
background-color: black;
33
border: 1px solid black;
4-
box-shadow: 0 8px 8px 0 rgb(0 0 0 / 50%);
4+
box-shadow: 0 8px 8px 0 rgb(0, 0, 0, 50%);
55
min-width: 150px;
66
overflow: hidden;
77
position: absolute;
@@ -14,7 +14,7 @@
1414
}
1515

1616
#shaka-player-ui-thumbnail-time {
17-
background-color: rgb(0 0 0 / 50%);
17+
background-color: rgb(0, 0, 0, 50%);
1818
bottom: 0;
1919
color: white;
2020
font-size: 16px;
@@ -29,7 +29,7 @@
2929
background-color: white;
3030
border: 1px solid black;
3131
border-radius: 10px;
32-
box-shadow: 0 8px 8px 0 rgb(0 0 0 / 50%);
32+
box-shadow: 0 8px 8px 0 rgb(0, 0, 0, 50%);
3333
color: black;
3434
overflow: hidden;
3535
padding: 1px 7px;

ui/less/tooltip.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
font-size: 13px;
5454

5555
/* Styling */
56-
background: rgba(35 35 35 / 90%);
56+
background: rgba(35, 35, 35, 90%);
5757
color: white;
5858
border-radius: 3px;
5959
padding: 5px 10px;

0 commit comments

Comments
 (0)