Files
youtube-music/plugins/video-toggle/button-switcher.css
2023-10-03 18:03:13 +09:00

87 lines
1.5 KiB
CSS

#main-panel.ytmusic-player-page {
align-items: unset !important;
}
#main-panel {
position: relative;
}
.video-switch-button {
z-index: 999;
box-sizing: border-box;
padding: 0;
margin-top: 20px;
margin-left: 10px;
background: rgba(33, 33, 33, 0.4);
border-radius: 30px;
overflow: hidden;
width: 20rem;
text-align: center;
font-size: 18px;
letter-spacing: 1px;
color: #fff;
padding-right: 10rem;
position: absolute;
}
.video-switch-button:before {
content: "Video";
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 10rem;
display: flex;
align-items: center;
justify-content: center;
z-index: 3;
pointer-events: none;
}
.video-switch-button-checkbox {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 100%;
height: 100%;
opacity: 0;
z-index: 2;
}
.video-switch-button-label-span {
position: relative;
}
.video-switch-button-checkbox:checked + .video-switch-button-label:before {
transform: translateX(10rem);
transition: transform 300ms linear;
}
.video-switch-button-checkbox + .video-switch-button-label {
position: relative;
padding: 15px 0;
display: block;
user-select: none;
pointer-events: none;
}
.video-switch-button-checkbox + .video-switch-button-label:before {
content: "";
background: rgba(60, 60, 60, 0.4);
height: 100%;
width: 100%;
position: absolute;
left: 0;
top: 0;
border-radius: 30px;
transform: translateX(0);
transition: transform 300ms;
}
/* disable the native toggler */
#av-id {
display: none;
}