@import '../common/style/var.less'; @import '../common/style/theme.less'; .van-stepper { font-size: 0; &__minus, &__plus { position: relative; display: inline-block; box-sizing: border-box; width: 28px; height: 28px; margin: 1px; padding: 5px; vertical-align: middle; border: 0; .theme(background-color, '@stepper-background-color'); &::before { width: 9px; height: 1px; } &::after { width: 1px; height: 9px; } &::before, &::after { position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; content: ''; .theme(background-color, '@text-color'); } &--hover { .theme(background-color, '@stepper-active-color'); } &--disabled { .theme(background-color, '@stepper-button-disabled-color'); &::before, &::after { .theme(background-color, '@gray'); } } &--disabled&--hover { .theme(background-color, '@stepper-button-disabled-color'); } } &__minus { .theme(border-radius, '@stepper-border-radius 0 0 @stepper-border-radius'); &::after { display: none; } } &__plus { .theme(border-radius, '0 @stepper-border-radius @stepper-border-radius 0'); } &__input { display: inline-block; box-sizing: border-box; width: 32px; height: 28px; // 覆盖 common style 中 input 的 min-height: 1.4rem; // 避免 button-size 对 input 设置的 height 不生效 min-height: 0; margin: 1px; padding: 1px; font-size: 14px; text-align: center; vertical-align: middle; border: 0; border-width: 1px 0; border-radius: 0; -webkit-appearance: none; .theme(color, '@text-color'); .theme(background-color, '@stepper-background-color'); &--disabled { .theme(color, '@gray'); .theme(background-color, '@stepper-input-disabled-color'); } } }