@fe6/water-pro
Version:
An enterprise-class UI design language and Vue-based implementation
121 lines (104 loc) • 2.02 kB
text/less
@inputNumberPrefixCls: rc-input-number;
.@{inputNumberPrefixCls} {
display: inline-block;
box-sizing: content-box;
height: 26px;
margin: 0;
padding: 0;
font-size: 12px;
line-height: 26px;
vertical-align: middle;
border: 1px solid #d9d9d9;
border-radius: 5px;
&-handler {
display: block;
height: 12px;
overflow: hidden;
line-height: 12px;
text-align: center;
touch-action: none;
&-active {
background: #ddd;
}
}
&-handler-up-inner,
&-handler-down-inner {
color: #666;
-webkit-user-select: none;
user-select: none;
}
&:hover {
border-color: #23c0fa;
.@{inputNumberPrefixCls}-handler-up,
.@{inputNumberPrefixCls}-handler-wrap {
border-color: #23c0fa;
}
}
&-disabled:hover {
border-color: #d9d9d9;
.@{inputNumberPrefixCls}-handler-up,
.@{inputNumberPrefixCls}-handler-wrap {
border-color: #d9d9d9;
}
}
&-input-wrap {
height: 26px;
overflow: hidden;
}
&-input {
width: 100%;
height: 26px;
padding: 0;
color: #666;
line-height: 26px;
text-align: center;
border: 0;
border-radius: 5px;
outline: 0;
transition: all 0.3s ease;
-moz-appearance: textfield;
}
&-handler-wrap {
float: right;
width: 20px;
height: 26px;
border-left: 1px solid #d9d9d9;
}
&-handler-up {
padding-top: 1px;
border-bottom: 1px solid #d9d9d9;
&-inner {
&::after {
content: '+';
}
}
}
&-handler-down {
&-inner {
&::after {
content: '-';
}
}
}
.handler-disabled() {
opacity: 0.72;
&:hover {
color: #999;
border-color: #d9d9d9;
}
}
&-handler-down-disabled,
&-handler-up-disabled {
.handler-disabled();
}
&-disabled {
.@{inputNumberPrefixCls}-input {
background-color: #f3f3f3;
cursor: not-allowed;
opacity: 0.72;
}
.@{inputNumberPrefixCls}-handler {
.handler-disabled();
}
}
}