42 lines
860 B
CSS
42 lines
860 B
CSS
input[type="radio"] {
|
|
all: unset;
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
background-color: var(--background);
|
|
margin: 0;
|
|
font: inherit;
|
|
color: var(--text);
|
|
border: 0.15em solid var(--text);
|
|
border-radius: 50%;
|
|
display: grid;
|
|
place-content: center;
|
|
aspect-ratio: 1/1;
|
|
width: 1em;
|
|
height: 1em;
|
|
}
|
|
|
|
input[type="radio"]:checked {
|
|
border: 0.15em solid var(--text);
|
|
background-color: var(--text);
|
|
}
|
|
|
|
input[type="radio"]::before {
|
|
content: "";
|
|
width: 1em;
|
|
height: 1em;
|
|
border-radius: 50%;
|
|
transform: scale(0);
|
|
transition: 120ms transform ease-in-out;
|
|
box-shadow: inset 1em 1em var(--background);
|
|
}
|
|
|
|
input[type="radio"]:checked::before {
|
|
transform: scale(0.5);
|
|
box-shadow: none;
|
|
}
|
|
|
|
input[type="radio"]:focus {
|
|
outline: max(1px, 0.15em) solid var(--text);
|
|
outline-offset: max(1px, 0.1em);
|
|
box-shadow: none;
|
|
}
|