mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-28 05:57:58 +01:00
45 lines
1.4 KiB
CSS
45 lines
1.4 KiB
CSS
|
input[type=checkbox].checkbox {
|
||
|
appearance: none;
|
||
|
}
|
||
|
|
||
|
.checkbox {
|
||
|
display: inline-block;
|
||
|
align-self: center;
|
||
|
width: var(--checkbox-width);
|
||
|
height: var(--checkbox-height);
|
||
|
background: var(--danger-color);
|
||
|
border: var(--checkbox-border-width) solid var(--danger-border-color);
|
||
|
border-radius: var(--border-radius-checkbox);
|
||
|
transition: background var(--transition-long-animation-duration) ease,
|
||
|
border-color var(--transition-long-animation-duration) ease;
|
||
|
}
|
||
|
|
||
|
.checkbox::after {
|
||
|
content: '';
|
||
|
font-family: var(--fa-style-family, "Font Awesome 6 Free");
|
||
|
font-weight: var(--fa-style, 900);
|
||
|
text-align: center;
|
||
|
line-height: calc(var(--checkbox-height) - var(--checkbox-border-width) * 2);
|
||
|
display: block;
|
||
|
position: relative;
|
||
|
background: var(--text-color);
|
||
|
width: calc(var(--checkbox-height) - var(--checkbox-border-width) * 2);
|
||
|
height: calc(var(--checkbox-height) - var(--checkbox-border-width) * 2);
|
||
|
border-radius: 100%;
|
||
|
left: 0px;
|
||
|
transition: left var(--transition-long-animation-duration) ease;
|
||
|
}
|
||
|
|
||
|
.checkbox:checked {
|
||
|
background: var(--success-color);
|
||
|
border-color: var(--success-border-color);
|
||
|
transition: background var(--transition-long-animation-duration) ease,
|
||
|
border-color var(--transition-long-animation-duration) ease;
|
||
|
}
|
||
|
|
||
|
.checkbox:checked::after {
|
||
|
content: '';
|
||
|
left: calc(var(--checkbox-width) - var(--checkbox-height));
|
||
|
transition: left var(--transition-long-animation-duration) ease;
|
||
|
}
|