<div class="demo">
<radio-group>
<radio-button>Water</radio-button>
<radio-button>Coffee</radio-button>
<radio-button>Tea</radio-button>
<radio-button>Cola</radio-button>
<radio-button>Ginger Ale</radio-button>
</radio-group>
</div>
body {
font-family: sans-serif;
}
.demo {
margin-left: 80px;
}
radio-button {
position: relative;
display: block;
font-size: 18px;
padding: 2px 0;
}
radio-button:focus {
outline: none;
}
radio-button::before {
content: "";
display: block;
width: 10px;
height: 10px;
border: 1px solid black;
position: absolute;
left: -18px;
top: 7px;
border-radius: 50%;
}
radio-button:focus::before {
box-shadow: 0 0 3px 3px #83beff;
}
radio-button[aria-checked="true"]::before {
content: "";
display: block;
width: 10px;
height: 10px;
background: red;
position: absolute;
left: -18px;
top: 7px;
border-radius: 50%;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.