Files
ionic-framework/scss/ionic/_checkbox.scss
Adam Bradley a1208893f0 checkbox tests
2013-10-16 18:47:07 -05:00

49 lines
1.1 KiB
SCSS

.checkbox {
position: relative;
display: inline-block;
padding: ($checkbox-height / 4) ($checkbox-width / 4);
cursor: pointer;
input {
display: none;
}
/* what the checkbox looks like when its not checked */
.handle {
width: $checkbox-width;
height: $checkbox-height;
border: $checkbox-border-width solid $checkbox-off-border-color;
border-radius: $checkbox-border-radius;
background: $checkbox-off-bg-color;
transition: background-color .1s ease-in-out;
}
/* the checkmark within the box */
.handle:after {
position: absolute;
top: 37%;
left: $checkbox-width / 2;
width: $checkbox-width / 2;
height: $checkbox-width / 4;
border: $checkbox-check-width solid $checkbox-check-color;
border-top: none;
border-right: none;
content: '';
opacity: 0;
transition: opacity .05s ease-in-out;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}
/* what it looks like when it is checked */
input:checked + .handle {
background: $checkbox-on-bg-color;
&:after {
opacity: 1;
}
}
}