1
0
Fork 0
mirror of https://github.com/GuerillaStudio/now-playing synced 2024-11-19 19:02:46 +00:00
now-playing/assets/scss/3-components/_switch.scss

50 lines
1.2 KiB
SCSS
Raw Normal View History

2019-11-27 17:06:26 +00:00
/**
* Radiobox Module
* Namespace: .radiobox
*/
/* ----------------------------------------------------------- */
/* == module */
/* ----------------------------------------------------------- */
.switch[type="checkbox"] {
position: relative;
margin-top: -.05em;
width: 4rem;
height: 2rem;
outline: none;
border: $input-border;
border-radius: 42rem;
background-color: white;
box-shadow: inset -2rem 0 0 .1rem rgba(192, 192, 192, .5);
transition: .2s;
appearance: none;
}
.switch[type="checkbox"]::-ms-check {
opacity: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; // IE 8
}
/* Checked state
-------------------------------------------------------------- */
.switch[type="checkbox"]:checked {
border-color: $color-primary;
box-shadow: inset 2rem 0 0 .1rem rgba($color-primary, .7);
}
/* Focus state
-------------------------------------------------------------- */
.switch[type="checkbox"]:active,
.switch[type="checkbox"]:focus {
box-shadow: inset -2rem 0 0 .1rem rgba(192, 192, 192, .5), $focus-ring;
}
.switch[type="checkbox"]:checked:active,
.switch[type="checkbox"]:checked:focus {
box-shadow: inset 2rem 0 0 .1rem rgba($color-primary, .7), $focus-ring;
}