[bugfix] Checkbox: fix style error

fix #1606
This commit is contained in:
rex 2019-05-09 13:06:59 +08:00 committed by GitHub
parent faa7b6d14a
commit 34d5750e3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,25 +1,32 @@
@import '../common/style/var.less'; @import '../common/style/var.less';
.van-checkbox { .van-checkbox {
display: flex;
overflow: hidden; overflow: hidden;
user-select: none; user-select: none;
&__icon-wrap, &__icon-wrap,
&__label { &__label {
display: inline-block;
line-height: @checkbox-size; line-height: @checkbox-size;
vertical-align: middle; }
&__icon-wrap {
flex: none;
}
&__label {
word-break: break-all;
} }
&__icon { &__icon {
display: block; display: block;
font-size: 14px;
width: @checkbox-size; width: @checkbox-size;
height: @checkbox-size; height: @checkbox-size;
font-size: 14px;
color: transparent; color: transparent;
text-align: center; text-align: center;
box-sizing: border-box;
border: 1px solid @checkbox-border-color; border: 1px solid @checkbox-border-color;
box-sizing: border-box;
transition: @checkbox-transition-duration; transition: @checkbox-transition-duration;
&--round { &--round {
@ -28,13 +35,13 @@
&--checked { &--checked {
color: @white; color: @white;
border-color: @checkbox-checked-icon-color;
background-color: @checkbox-checked-icon-color; background-color: @checkbox-checked-icon-color;
border-color: @checkbox-checked-icon-color;
} }
&--disabled { &--disabled {
border-color: @checkbox-disabled-icon-color;
background-color: @checkbox-disabled-background-color; background-color: @checkbox-disabled-background-color;
border-color: @checkbox-disabled-icon-color;
} }
&--disabled&--checked { &--disabled&--checked {
@ -43,8 +50,8 @@
} }
&__label { &__label {
color: @checkbox-label-color;
margin-left: @checkbox-label-margin; margin-left: @checkbox-label-margin;
color: @checkbox-label-color;
&--left { &--left {
float: left; float: left;