UNPKG

antd-mobile

Version:

基于 React 的移动设计规范实现

186 lines (155 loc) 3.31 kB
@import '../../style/themes/default'; @import "../../style/mixins"; @stepperPrefixCls: am-stepper; .iconfont-mixin() { display: inline-block; font-style: normal; vertical-align: baseline; text-align: center; text-transform: none; text-rendering: auto; &:before { display: block; font-family: "anticon" !important; } } .@{stepperPrefixCls} { position: relative; margin: 0; padding: 4px 0; display: inline-block; box-sizing: content-box; width: 126px; height: 70px; line-height: 70px; font-size: @font-size-base; vertical-align: middle; overflow: hidden; &-handler-wrap { position: absolute; width: 100%; font-size: @font-size-display-lg; } &-handler, &-handler-up-inner, &-handler-down-inner { width: 60px; height: 60px; line-height: 60px; } &-handler { text-align: center; border: @border-width-md solid @border-color-base; border-radius: @radius-md; overflow: hidden; color: @color-text-base; position: absolute; display: inline-block; box-sizing: content-box; &-active { z-index: 2; background-color: @fill-tap; } } &-handler-up { border-top-left-radius: 0; border-bottom-left-radius: 0; } &-handler-down { border-top-right-radius: 0; border-bottom-right-radius: 0; } &-handler-up-inner, &-handler-down-inner { .iconfont-mixin(); user-select: none; right: 4px; color: @color-text-base; } &-input-wrap { display: none; width: 100%; height: 60px; line-height: 60px; text-align: center; overflow: hidden; } &-input { display: none; width: 120px; font-size: 32px; color: @color-text-base; text-align: center; border: 0; padding: 0; background: none; vertical-align: middle; &[disabled] { opacity: 1; color: @color-text-base; } } &.showNumber { width: 276px; .@{stepperPrefixCls}-input-wrap { display: inline-block; } .@{stepperPrefixCls}-input { display: inline-block; } .@{stepperPrefixCls}-handler-up { border-top-left-radius: @radius-md; border-bottom-left-radius: @radius-md; } .@{stepperPrefixCls}-handler-down { border-top-right-radius: @radius-md; border-bottom-right-radius: @radius-md; border-right: @border-width-md solid @border-color-base; } .@{stepperPrefixCls}-handler-down-disabled { right: -2px; } } &-handler-up { cursor: pointer; right: 0; &-inner { &:before { text-align: center; content: "+"; } } } &-handler-down { cursor: pointer; left: 0; &-inner { &:before { text-align: center; content: "-"; } } } &-handler-down-disabled, &-handler-up-disabled { opacity: @opacity-disabled; } &-handler-up-disabled &-handler-active { background: none; } &-disabled { .@{stepperPrefixCls}-handler-down, .@{stepperPrefixCls}-handler-up { opacity: @opacity-disabled; background: none; } } &-disabled { .@{stepperPrefixCls}-handler { opacity: @opacity-disabled; } .@{stepperPrefixCls}-input-wrap { opacity: @opacity-disabled; } } }