Skip to content

Commit 74fda8b

Browse files
authored
feat(UI): Hide volume slider when not hovering over the mute button (#8426)
Close #8422
1 parent d761dae commit 74fda8b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

ui/less/range_elements.less

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,28 @@
142142
.shaka-volume-bar-container {
143143
width: 100px;
144144
padding: 0;
145+
transition-property: opacity, width;
146+
transition-duration: 250ms;
147+
transition-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
148+
149+
&:active,
150+
&:focus,
151+
&:hover {
152+
width: 100px !important;
153+
opacity: 1 !important;
154+
}
155+
}
156+
157+
.shaka-mute-button + .shaka-volume-bar-container {
158+
width: 0;
159+
opacity: 0;
160+
}
161+
162+
.shaka-mute-button:active + .shaka-volume-bar-container,
163+
.shaka-mute-button:focus + .shaka-volume-bar-container,
164+
.shaka-mute-button:hover + .shaka-volume-bar-container {
165+
width: 100px;
166+
opacity: 1;
145167
}
146168

147169
.shaka-range-element {

0 commit comments

Comments
 (0)