improve css stability of rot.js music control

This commit is contained in:
uwaa 2025-01-27 14:51:10 +00:00
parent 8c44100220
commit 15c05baa5a

View file

@ -2,9 +2,10 @@
position: relative; position: relative;
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
padding: 5px 10px;
border-radius: var(--panelRadius); border-radius: var(--panelRadius);
transition: background-color 0.2s; transition: background-color 0.2s;
flex: 0 0 27px;
margin-left: 2px;
} }
.mutebutton input { .mutebutton input {
@ -16,15 +17,18 @@
} }
.mutecheck { .mutecheck {
display: inline-block; display: flex;
font-family: "Arimo"; font-family: "Arimo";
font-size: 20px; font-size: 20px;
text-align: center; text-align: center;
color: var(--lightText); color: var(--lightText);
width: 24px; width: 24px;
height: 24px; height: 24px;
border-radius: 24px; border-radius: 100%;
padding: 2px; align-items: center;
justify-content: center;
padding: 12px;
margin: -12px;
} }
/* unmuted state */ /* unmuted state */
@ -52,6 +56,8 @@ input:checked ~ .mutecheck:hover::before {
height: 20px; height: 20px;
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
margin-left: 10px;
margin-right: 10px;
} }
.volume-track { .volume-track {
@ -62,6 +68,7 @@ input:checked ~ .mutecheck:hover::before {
height: 4px; height: 4px;
background-color: var(--btn); background-color: var(--btn);
border-radius: 2px; border-radius: 2px;
user-select: none;
} }
.volume-fill { .volume-fill {
@ -81,14 +88,17 @@ input:checked ~ .mutecheck:hover::before {
height: 12px; height: 12px;
background-color: var(--link); background-color: var(--link);
border-radius: 50%; border-radius: 50%;
user-select: none;
} }
.audioControl { .audioControl {
border-radius: var(--panelRadius); border-radius: var(--panelRadius);
padding: 6px;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 2px; gap: 8px;
padding: 12px 16px 12px 16px;
min-height: 32px;
max-height: 32px;
} }
.volume-button-dwn, .volume-button-up { .volume-button-dwn, .volume-button-up {
@ -97,15 +107,9 @@ input:checked ~ .mutecheck:hover::before {
font-size: 24px; font-size: 24px;
text-align: center; text-align: center;
color: var(--icon); color: var(--icon);
width: 32px; width: 24px;
padding: 4px; height: 25px;
} flex: 0 0 24px;
.volume-button-dwn {
margin: 0 3px 0 6px;
}
.volume-button-up {
margin: 0 6px 0 3px;
} }
.volume-button-up:hover, .volume-button-dwn:hover { .volume-button-up:hover, .volume-button-dwn:hover {
@ -113,5 +117,7 @@ input:checked ~ .mutecheck:hover::before {
} }
.volume-percentage { .volume-percentage {
margin-right: 10px; width: 32px;
flex: 0 0 32px;
user-select: none;
} }