mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
* perf: remove CSS variables polyfill * style: fix missing calc value * perf: reduce some useless css vars
93 lines
1.9 KiB
Plaintext
93 lines
1.9 KiB
Plaintext
@import '../common/style/var.less';
|
|
|
|
.van-checkbox {
|
|
display: flex;
|
|
align-items: center;
|
|
overflow: hidden;
|
|
user-select: none;
|
|
|
|
&--horizontal {
|
|
margin-right: @padding-sm;
|
|
}
|
|
|
|
&__icon-wrap,
|
|
&__label {
|
|
line-height: var(--checkbox-size, @checkbox-size);
|
|
}
|
|
|
|
&__icon-wrap {
|
|
flex: none;
|
|
}
|
|
|
|
&__icon {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-sizing: border-box;
|
|
width: 1em;
|
|
height: 1em;
|
|
color: transparent;
|
|
text-align: center;
|
|
transition-property: color, border-color, background-color;
|
|
font-size: var(--checkbox-size, @checkbox-size);
|
|
border: 1px solid var(--checkbox-border-color, @checkbox-border-color);
|
|
transition-duration: var(
|
|
--checkbox-transition-duration,
|
|
@checkbox-transition-duration
|
|
);
|
|
|
|
&--round {
|
|
border-radius: 100%;
|
|
}
|
|
|
|
&--checked {
|
|
color: @white;
|
|
background-color: var(
|
|
--checkbox-checked-icon-color,
|
|
@checkbox-checked-icon-color
|
|
);
|
|
border-color: var(
|
|
--checkbox-checked-icon-color,
|
|
@checkbox-checked-icon-color
|
|
);
|
|
}
|
|
|
|
&--disabled {
|
|
background-color: var(
|
|
--checkbox-disabled-background-color,
|
|
@checkbox-disabled-background-color
|
|
);
|
|
border-color: var(
|
|
--checkbox-disabled-icon-color,
|
|
@checkbox-disabled-icon-color
|
|
);
|
|
}
|
|
|
|
&--disabled&--checked {
|
|
color: var(--checkbox-disabled-icon-color, @checkbox-disabled-icon-color);
|
|
}
|
|
}
|
|
|
|
&__label {
|
|
word-wrap: break-word;
|
|
padding-left: var(--checkbox-label-margin, @checkbox-label-margin);
|
|
color: var(--checkbox-label-color, @checkbox-label-color);
|
|
|
|
&--left {
|
|
float: left;
|
|
margin: 0 var(--checkbox-label-margin, @checkbox-label-margin) 0 0;
|
|
}
|
|
|
|
&--disabled {
|
|
color: var(
|
|
--checkbox-disabled-label-color,
|
|
@checkbox-disabled-label-color
|
|
);
|
|
}
|
|
|
|
&:empty {
|
|
margin: 0;
|
|
}
|
|
}
|
|
}
|