/* Scss Document */ .inputGroupq { background-color: #fff; display: block; margin: 3px 0; position: relative; label { padding: 8px 30px; width: 100%; display: block; text-align: left; color: #3C454C; cursor: pointer; position: relative; z-index: 2; transition: color 200ms ease-in; overflow: hidden; &:before { width: 10px; height: 10px; border-radius: 50%; content: ''; background-color:#9AA3AC; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale3d(1, 1, 1); transition: all 300ms cubic-bezier(0.4, 0.0, 0.2, 1); opacity: 0; z-index: -1; } &:after { width: 16px; height: 16px; content: ''; border: 2px solid #9AA3AC; background-color: #fff; background-repeat: no-repeat; background-position: 2px 3px; border-radius: 50%; z-index: 2; position: absolute; right: 30px; top: 50%; transform: translateY(-50%); cursor: pointer; transition: all 200ms ease-in; } } input:checked ~ label { color:#1F2427; &:before { transform: translate(-50%, -50%) scale3d(100, 100, 1); opacity: 1; } &:after { background-color:black; border-color: white; } } input { width: 20px; height: 20px; order: 1; z-index: 2; position: absolute; right: 30px; top: 50%; transform: translateY(-50%); cursor: pointer; visibility: hidden; } } // codepen formatting *, *::before, *::after { box-sizing: inherit; } html { box-sizing: border-box; } code { background-color: #9AA3AC; padding: 0 8px; } //------------ //------------