2021-03-24 13:18:56 +00:00
|
|
|
// build with the help of this article, with some of our own modifications
|
|
|
|
|
// https://moderncss.dev/pure-css-custom-styled-radio-buttons/
|
|
|
|
|
|
|
|
|
|
.radio {
|
|
|
|
|
font-size: $x-small;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
&__input {
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
input {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
width: 0;
|
|
|
|
|
height: 0;
|
2022-01-04 17:49:42 +00:00
|
|
|
position: absolute;
|
2021-03-24 13:18:56 +00:00
|
|
|
|
|
|
|
|
& + .radio__control::before {
|
|
|
|
|
position: absolute;
|
|
|
|
|
content: "";
|
2022-02-09 16:28:50 +00:00
|
|
|
width: 10px;
|
|
|
|
|
height: 10px;
|
2021-04-09 19:04:11 +00:00
|
|
|
box-shadow: inset 1em 1em $core-vibrant-blue;
|
2022-01-13 23:11:45 +00:00
|
|
|
background-color: $core-vibrant-blue;
|
2021-03-24 13:18:56 +00:00
|
|
|
border-radius: 50%;
|
2022-01-04 17:49:42 +00:00
|
|
|
top: 3px;
|
|
|
|
|
left: 3px;
|
2021-03-24 13:18:56 +00:00
|
|
|
transition: 180ms transform ease-in-out;
|
|
|
|
|
transform: scale(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:checked + .radio__control::before {
|
|
|
|
|
transform: scale(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:focus + .radio__control {
|
2021-04-09 19:04:11 +00:00
|
|
|
border-color: $core-vibrant-blue;
|
2021-03-24 13:18:56 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&__control {
|
|
|
|
|
position: relative;
|
|
|
|
|
display: flex;
|
2022-01-04 17:49:42 +00:00
|
|
|
width: 16px;
|
|
|
|
|
height: 16px;
|
2021-03-24 13:18:56 +00:00
|
|
|
border-radius: 50%;
|
2023-01-05 15:23:27 +00:00
|
|
|
border: 2px solid $ui-fleet-black-10;
|
2021-03-24 13:18:56 +00:00
|
|
|
transform: translateY(-0.05em);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&__label {
|
2022-01-04 17:49:42 +00:00
|
|
|
margin-left: $pad-small;
|
2021-03-24 13:18:56 +00:00
|
|
|
line-height: 1;
|
|
|
|
|
}
|
|
|
|
|
}
|