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.

192 lines
3.3 KiB

10 years ago
@inputNumberPrefixCls: ant-input-number;
@import "../mixins/iconfont";
@import "../mixins/input";
10 years ago
.@{inputNumberPrefixCls} {
.input();
10 years ago
margin: 0;
padding: 0;
line-height: 28px;
10 years ago
font-size: 12px;
height: 28px;
10 years ago
display: inline-block;
vertical-align: middle;
border: 1px solid #D9D9D9;
border-radius: @border-radius-base;
overflow: hidden;
10 years ago
&-handler {
text-align: center;
line-height: 0;
height: 14px;
10 years ago
overflow: hidden;
color: #999;
&:hover &-up-inner,
&:hover &-down-inner {
color: tint(@primary-color, 20%);
}
10 years ago
}
&-handler-up-inner, &-handler-down-inner {
.iconfont-mixin();
line-height: 12px;
10 years ago
user-select: none;
-webkit-user-select: none;
position: absolute;
width: 12px;
height: 12px;
.iconfont-size-under-12px(8px);
right: 4px;
color: #999;
}
10 years ago
&:hover {
.hover();
10 years ago
}
&-focused {
.active();
}
10 years ago
&-disabled {
.disabled();
10 years ago
}
&-input-wrap {
overflow: hidden;
height: 28px;
10 years ago
}
&-input {
width: 100%;
text-align: left;
10 years ago
outline: 0;
-moz-appearance: textfield;
line-height: 28px;
height: 28px;
10 years ago
transition: all 0.3s ease;
color: #666666;
border: 0;
border-radius: @border-radius-base;
padding: 0 7px;
&[disabled] {
.disabled();
}
10 years ago
}
9 years ago
&-lg {
padding: 0;
.ant-input-number-handler-wrap {
9 years ago
height: 32px;
}
.ant-input-number-input-wrap {
9 years ago
height: 32px;
}
.ant-input-number-handler {
9 years ago
height: 16px;
}
input {
9 years ago
height: 32px;
line-height: 32px;
font-size: 14px;
}
.ant-input-number-handler-up-inner {
9 years ago
top: 2px;
}
.ant-input-number-handler-down-inner {
9 years ago
top: 18px;
}
}
&-sm {
padding: 0;
.ant-input-number-handler-wrap {
9 years ago
height: 22px;
}
.ant-input-number-input-wrap {
9 years ago
height: 22px;
overflow: hidden;
position: relative;
}
.ant-input-number-handler {
9 years ago
height: 11px;
}
input {
9 years ago
height: 22px;
line-height: 22px;
position: absolute;
top: 0;
}
.ant-input-number-handler-up-inner {
9 years ago
top: -1px;
}
.ant-input-number-handler-down-inner {
9 years ago
top: 10px;
}
}
10 years ago
&-handler-wrap {
float: right;
border-left: 1px solid #D9D9D9;
width: 22px;
height: 28px;
position: relative;
10 years ago
}
&-handler-up {
border-bottom: 1px solid #D9D9D9;
cursor: pointer;
10 years ago
&-inner {
top: 1px;
10 years ago
&:before {
content: "\e600";
.ie-rotate(2);
transform: rotate(180deg);
-webkit-transform-origin: 47.5% 51%; /* fix chrome position */
10 years ago
}
}
}
&-handler-down {
cursor: pointer;
10 years ago
&-inner {
&:before {
content: "\e600";
10 years ago
}
}
}
.handler-disabled() {
opacity: 0.72;
color: #ccc !important;
cursor: default;
10 years ago
&:hover {
color: #ccc;
cursor: default;
10 years ago
}
}
&-handler-down-disabled, &-handler-up-disabled, &-disabled {
.@{inputNumberPrefixCls}-handler-down-inner,
.@{inputNumberPrefixCls}-handler-up-inner {
.handler-disabled();
}
10 years ago
}
&-disabled {
.@{inputNumberPrefixCls}-input {
opacity: 0.72;
cursor: not-allowed;
background-color: #f3f3f3;
}
.@{inputNumberPrefixCls}-handler {
.handler-disabled();
}
}
}