input[type="radio"], input[type="checkbox"] { position: relative; width: 17px; height: 17px; cursor: pointer; appearance: none; border: 2px solid var(--radioCheckboxInitialColor); &:before, &:after { display: block; opacity: 0; background: #fff; z-index: 2; } &:checked { border-color: var(--radioCheckboxAccentColor); background: var(--radioCheckboxAccentColor); &:before, &:after { opacity: 1; } } &:focus { outline: none; } } input[type="checkbox"] { border-radius: 2px; &:before, &:after { position: absolute; content: ''; top: 0; bottom: 0; margin: auto 0; border-radius: 1px; } &:before { left: 4px; width: 2px; height: 7px; transform: rotate(-40deg) translateX(-1px); } &:after { right: 4px; width: 2px; height: 9px; transform: rotate(35deg); } } input[type="radio"] { border-radius: 100%; &:before { position: absolute; content: ''; top: 0; left: 0; right: 0; bottom: 0; width: 5px; height: 5px; margin: auto; border-radius: inherit; } }