.sq-switch { font-size: 1em; position: relative; box-shadow: none; height: auto; background: inherit; } .sq-switch input { position: absolute; height: 1px; width: 1px; background: 0 0; border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; padding: 0 } .sq-switch input + label { position: relative; min-width: calc(calc(2.375em * .8) * 2); border-radius: calc(2.375em * .8); height: calc(2.375em * .8); line-height: calc(2.375em * .8); font-size: 16px; font-weight: bold; display: inline-block; cursor: pointer; outline: 0; user-select: none; vertical-align: middle; text-indent: calc(calc(calc(2.375em * .8) * 2) + .5em) } .sq-switch input + label::after, .sq-switch input + label::before { content: ''; position: absolute; top: 0; left: 0; width: calc(calc(2.375em * .8) * 2); bottom: 0; display: block } .sq-switch input + label::before { right: 0; background-color: #dee2e6; border-radius: calc(2.375em * .8); transition: .2s all } .sq-switch.redgreen input + label::before { background-color: #9c2032; } .sq-switch input + label::after { top: 2px; left: 2px; width: calc(calc(2.375em * .8) - calc(2px * 2)); height: calc(calc(2.375em * .8) - calc(2px * 2)); border-radius: 50%; background-color: #fff; transition: .2s all } .sq-switch input:checked + label::before { background-color: #488698 } .sq-switch.redgreen input:checked + label::before { background-color: #20bc49 } .sq-switch input:checked + label::after { margin-left: calc(2.375em * .8) } .sq-switch input:focus + label::before { outline: 0; box-shadow: 0 0 0 .2em rgba(0, 136, 221, .25) } .sq-switch input:disabled + label { color: #868e96; cursor: not-allowed } .sq-switch input:disabled + label::before { background-color: #e9ecef } .sq-switch.sq-switch-sm { font-size: .875em } .sq-switch.sq-switch-sm input + label { min-width: calc(calc(1.9375em * .8) * 2); height: calc(1.9375em * .8); line-height: calc(1.9375em * .8); text-indent: calc(calc(calc(2.1375em * .8) * 2) + .5em) } .sq-switch.sq-switch-sm input + label::before { width: calc(calc(1.9375em * .8) * 2) } .sq-switch.sq-switch-sm input + label::after { width: calc(calc(1.9375em * .8) - calc(2px * 2)); height: calc(calc(1.9375em * .8) - calc(2px * 2)) } .sq-switch.sq-switch-sm input:checked + label::after { margin-left: calc(1.9375em * .8) } /*************************************************************/ .sq-switch.sq-switch-xxs { font-size: .7em } .sq-switch.sq-switch-xxs input + label { min-width: calc(calc(0.9375em * .8) * 2); height: calc(0.9375em * .8); line-height: calc(0.9375em * .8); text-indent: calc(calc(calc(1.1375em * .8) * 2) + .5em) } .sq-switch.sq-switch-xxs input + label::before { width: calc(calc(0.9375em * .8) * 2) } .sq-switch.sq-switch-xxs input + label::after { width: calc(calc(0.9375em * .8) - calc(2px * 2)); height: calc(calc(0.9375em * .8) - calc(2px * 2)) } .sq-switch.sq-switch-xxs input:checked + label::after { margin-left: calc(0.9375em * .8) } /*************************************************************/ .sq-switch.sq-switch-lg { font-size: 1.25em } .sq-switch.sq-switch-lg input + label { min-width: calc(calc(3em * .8) * 2); height: calc(3em * .8); line-height: calc(3em * .8); text-indent: calc(calc(calc(3em * .8) * 2) + .5em) } .sq-switch.sq-switch-lg input + label::before { width: calc(calc(3em * .8) * 2) } .sq-switch.sq-switch-lg input + label::after { width: calc(calc(3em * .8) - calc(2px * 2)); height: calc(calc(3em * .8) - calc(2px * 2)) } .sq-switch.sq-switch-lg input:checked + label::after { margin-left: calc(3em * .8) } .sq-switch + .sq-switch { margin-left: 1em } .dropdown-menu { margin-top: .75em } .sq-switch .offset-1{ margin-left: 70px !important; }