diff --git a/internal/templates/watch.templ b/internal/templates/watch.templ
index ee74c7c..72f2b7f 100644
--- a/internal/templates/watch.templ
+++ b/internal/templates/watch.templ
@@ -232,6 +232,7 @@ templ VideoPlayer(data WatchPageData) {
+
{
})
muteBtn?.addEventListener('mouseenter', () => {
- volumeWrap?.classList.add('show-volume')
+ muteBtn.classList.add('show-volume')
isHoveringVolume = true
showControls()
})
muteBtn?.addEventListener('mouseleave', () => {
- volumeWrap?.classList.remove('show-volume')
isHoveringVolume = false
showControls()
})
diff --git a/static/style.css b/static/style.css
index 4bab98d..054c6b1 100644
--- a/static/style.css
+++ b/static/style.css
@@ -84,8 +84,9 @@
height: 130px;
}
-.volume-wrap.show-volume .volume-panel,
-.volume-wrap.show-volume::before,
+.volume-wrap:has([data-mute]:hover) .volume-panel,
+.volume-wrap:has([data-volume-bridge]:hover) .volume-panel,
+.volume-wrap:has(.volume-panel:hover) .volume-panel,
.volume-wrap:focus-within .volume-panel,
.volume-panel:hover,
.volume-panel:focus-within {
@@ -94,7 +95,9 @@
pointer-events: auto;
}
-.volume-wrap.show-volume .volume-underline,
+.volume-wrap:has([data-mute]:hover) .volume-underline,
+.volume-wrap:has([data-volume-bridge]:hover) .volume-underline,
+.volume-wrap:has(.volume-panel:hover) .volume-underline,
.volume-wrap:focus-within .volume-underline {
opacity: 1;
}