vant/packages/checkbox/index.less
2018-12-15 11:02:16 +08:00

71 lines
1.3 KiB
Plaintext

@import '../style/var';
.van-checkbox {
overflow: hidden;
user-select: none;
&__icon,
&__label {
display: inline-block;
vertical-align: middle;
line-height: @checkbox-size;
}
&__icon {
height: @checkbox-size;
.van-icon {
font-size: 14px;
color: transparent;
text-align: center;
line-height: inherit;
width: @checkbox-size;
height: @checkbox-size;
box-sizing: border-box;
border: 1px solid @checkbox-border-color;
transition: @checkbox-transition-duration;
}
&--round {
.van-icon {
border-radius: 100%;
}
}
&--checked {
.van-icon {
color: @white;
border-color: @checkbox-checked-icon-color;
background-color: @checkbox-checked-icon-color;
}
}
&--disabled {
.van-icon {
border-color: @checkbox-disabled-icon-color;
background-color: @checkbox-disabled-background-color;
}
}
&--disabled&--checked {
.van-icon {
color: @checkbox-disabled-icon-color;
}
}
}
&__label {
color: @checkbox-label-color;
margin-left: @checkbox-label-margin;
&--left {
float: left;
margin: 0 @checkbox-label-margin 0 0;
}
&--disabled {
color: @checkbox-disabled-label-color;
}
}
}