input[type="radio"], input[type="checkbox"] { position: relative; width: 17px; height: 17px; cursor: pointer; appearance: none; border: var(--formBorderSize) 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"] { display: inline-flex; justify-content: center; border-radius: 2px; &:before, &:after { position: absolute; content: ''; top: 0; bottom: 0; margin: auto 0; border-radius: 1px; } &:before { // left: 6px; width: 2px; height: 7px; transform: rotate(-40deg) translateX(-2px) translateY(-1px); } &:after { // right: 6px; width: 2px; height: 9px; transform: rotate(35deg) translateX(1px) translateY(-1px); } } 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; } }