@import './common/var.css'; $van-checkbox-size: 20px; .van-checkbox { overflow: hidden; .van-icon-success { color: $white; display: block; line-height: 1; font-size: 12px; text-align: center; pointer-events: none; border: 1px solid #aaa; width: $van-checkbox-size; height: $van-checkbox-size; box-sizing: border-box; &::before { margin: 0 auto; line-height: $van-checkbox-size; } } &__input { position: relative; height: $van-checkbox-size; margin-right: 15px; float: left; } &__control { position: absolute; top: 0; left: 0; opacity: 0; margin: 0; width: $van-checkbox-size; height: $van-checkbox-size; } &__label { display: block; margin-left: 37px; line-height: $van-checkbox-size; } &--round { .van-icon-success { border-radius: 100%; } } &__control:checked + .van-icon-success { border-color: $green; background-color: $green; } &--disabled { .van-icon-success { border-color: #d1dbe5; background-color: transparent; } .van-checkbox__control:checked + .van-icon-success { border-color: #d1dbe5; background-color: #d1dbe5; } } }