commento/frontend/sass/checkbox.scss

89 lines
1.9 KiB
SCSS
Raw Permalink Normal View History

@import "colors-main.scss";
2019-02-13 13:51:03 +08:00
.commento-round-check {
2019-02-19 00:23:44 +08:00
input[type="radio"],
input[type="checkbox"] {
display: none;
}
2019-02-19 00:23:44 +08:00
input[type="radio"] + label,
input[type="checkbox"] + label {
display: block;
position: relative;
padding-left: 35px;
margin-bottom: 5px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
2019-02-19 00:23:44 +08:00
input[type="radio"] + label:last-child,
input[type="checkbox"] + label:last-child {
margin-bottom: 0;
}
2019-02-19 00:23:44 +08:00
input[type="radio"] + label:before,
input[type="checkbox"] + label:before {
content: '';
display: block;
width: 13px;
height: 13px;
margin-top: 2px;
background: $gray-0;
border: 1px solid $gray-3;
border-radius: 3px;
position: absolute;
left: 0;
top: 0;
transition: all .15s;
}
2019-02-19 00:23:44 +08:00
input[type="radio"]:disabled + label:before,
input[type="checkbox"]:disabled + label:before {
background: $gray-0;
border: 1px solid $gray-4;
opacity: 0.4;
}
2019-02-19 00:23:44 +08:00
input[type="radio"]:checked + label:before,
input[type="checkbox"]:checked + label:before {
background: $blue-6;
border: 1px solid $blue-6;
}
2019-02-19 00:23:44 +08:00
input[type="radio"] + label:after,
input[type="checkbox"] + label:after {
position: absolute;
left: -7px;
top: 4px;
content: '';
display: inline-block;
width: 3px;
height: 7px;
transform: rotate(45deg);
margin-left: 12px;
margin-right: 12px;
border: solid transparent;
border-width: 0 2px 2px 0;
}
2019-02-19 00:23:44 +08:00
input[type="radio"]:disabled + label:after,
input[type="checkbox"]:disabled + label:after {
border: solid transparent;
border-width: 0 2px 2px 0;
}
2019-02-19 00:23:44 +08:00
input[type="radio"]:checked + label:after,
input[type="checkbox"]:checked + label:after {
border: solid $gray-0;
border-width: 0 2px 2px 0;
}
.pitch {
font-size: 14px;
color: #a5a5a5;
line-height: 20px !important;
}
}