You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

208 lines
3.9 KiB

@import "../../style/themes/default";
@import "../../style/mixins/index";
@import "../../input/style/mixin";
10 years ago
@input-number-prefix-cls: ~"@{ant-prefix}-input-number";
10 years ago
.handler-disabled() {
opacity: 0.72;
color: #ccc !important;
cursor: not-allowed;
}
.@{input-number-prefix-cls} {
.input();
10 years ago
margin: 0;
padding: 0;
font-size: @font-size-base;
height: @input-height-base;
10 years ago
display: inline-block;
border: @border-width-base @border-style-base @border-color-base;
border-radius: @border-radius-base;
width: 80px;
10 years ago
&-handler {
text-align: center;
line-height: 0;
height: 50%;
10 years ago
overflow: hidden;
color: @text-color-secondary;
position: relative;
transition: all 0.1s linear;
display: block;
width: 100%;
font-weight: bold;
&:active {
background: #f4f4f4;
}
&:hover &-up-inner,
&:hover &-down-inner {
color: @primary-5;
}
10 years ago
}
&-handler-up-inner,
&-handler-down-inner {
.iconfont-mixin();
line-height: 12px;
10 years ago
user-select: none;
position: absolute;
width: 12px;
height: 12px;
transition: all 0.1s linear;
.iconfont-size-under-12px(7px);
right: 4px;
color: @text-color-secondary;
}
10 years ago
&:hover {
.hover();
10 years ago
}
&-focused {
.active();
}
10 years ago
&-disabled {
.disabled();
10 years ago
}
&-input {
width: 100%;
text-align: left;
10 years ago
outline: 0;
-moz-appearance: textfield;
line-height: 26px;
height: 26px;
transition: all 0.3s linear;
8 years ago
color: @text-color;
10 years ago
border: 0;
border-radius: @border-radius-base;
padding: 0 7px;
&[disabled] {
.disabled();
}
10 years ago
}
&-lg {
padding: 0;
.@{input-number-prefix-cls}-handler {
9 years ago
height: 16px;
}
input {
height: 30px;
line-height: 30px;
9 years ago
}
.@{input-number-prefix-cls}-handler-up-inner {
9 years ago
top: 2px;
}
.@{input-number-prefix-cls}-handler-down-inner {
bottom: 2px;
}
.@{input-number-prefix-cls}-handler-up:hover {
height: 18px;
9 years ago
}
}
&-sm {
padding: 0;
.@{input-number-prefix-cls}-handler {
9 years ago
height: 11px;
}
input {
height: 20px;
line-height: 20px;
9 years ago
}
.@{input-number-prefix-cls}-handler-up-inner {
9 years ago
top: -1px;
}
.@{input-number-prefix-cls}-handler-down-inner {
bottom: -1px;
}
.@{input-number-prefix-cls}-handler-up:hover {
height: 13px;
}
.@{input-number-prefix-cls}-handler-down:hover .@{input-number-prefix-cls}-handler-down-inner {
bottom: 4px;
9 years ago
}
}
10 years ago
&-handler-wrap {
border-left: @border-width-base @border-style-base @border-color-base;
width: 22px;
height: 100%;
background: @component-background;
position: absolute;
top: 0;
right: 0;
opacity: 0;
border-radius: 0 @border-radius-base @border-radius-base 0;
transition: opacity 0.24s linear 0.1s;
}
&:hover &-handler-wrap {
opacity: 1;
10 years ago
}
&-handler-up {
cursor: pointer;
10 years ago
&-inner {
top: 1px;
10 years ago
&:before {
text-align: center;
content: "\e61e";
10 years ago
}
}
&:hover {
height: 16px;
}
&:hover &-inner {
margin-top: 2px;
}
10 years ago
}
&-handler-down {
border-top: @border-width-base @border-style-base @border-color-base;
top: -1px;
cursor: pointer;
10 years ago
&-inner {
&:before {
text-align: center;
content: "\e61d";
10 years ago
}
}
&:hover {
height: 16px;
margin-top: -2px;
}
10 years ago
}
&-handler-down-disabled,
&-handler-up-disabled,
&-disabled {
.@{input-number-prefix-cls}-handler-down-inner,
.@{input-number-prefix-cls}-handler-up-inner {
.handler-disabled();
}
10 years ago
}
&-disabled {
.@{input-number-prefix-cls}-input {
10 years ago
opacity: 0.72;
cursor: not-allowed;
background-color: #f3f3f3;
}
.@{input-number-prefix-cls}-handler-wrap {
display: none;
}
.@{input-number-prefix-cls}-handler {
10 years ago
.handler-disabled();
}
}
}