SpotifyControls: Fix flashing button row when using show on hover (#850)

Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
Ezzud 2023-04-11 00:21:30 +02:00 committed by GitHub
parent 0a3dc5c6e8
commit 7eb12f0fb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,8 +28,8 @@ function toggleHoverControls(value: boolean) {
const style = document.createElement("style");
style.id = "vc-spotify-hover-controls";
style.textContent = `
.vc-spotify-button-row { height: 0; opacity: 0; will-change: height, opacity; transition: height .2s, opacity .05s; }
#vc-spotify-player:hover .vc-spotify-button-row { opacity: 1; height: 32px; }
.vc-spotify-button-row { height: 0; opacity: 0; will-change: height, opacity; transition: height .2s, opacity .05s; pointer-events: none; }
#vc-spotify-player:hover .vc-spotify-button-row { opacity: 1; height: 32px; pointer-events: auto;}
`;
document.head.appendChild(style);
}