ant-design/components/input-number/style/index.less

208 lines
3.9 KiB
Plaintext
Raw Normal View History

@import "../../style/themes/default";
@import "../../style/mixins/index";
@import "../../input/style/mixin";
2015-07-01 14:48:47 +08:00
@input-number-prefix-cls: ~"@{ant-prefix}-input-number";
2015-07-01 14:48:47 +08:00
2015-11-26 19:32:55 +08:00
.handler-disabled() {
opacity: 0.72;
color: #ccc !important;
2016-05-14 15:17:42 +08:00
cursor: not-allowed;
2015-11-26 19:32:55 +08:00
}
2015-08-20 16:55:42 +08:00
.@{input-number-prefix-cls} {
2015-07-15 15:02:18 +08:00
.input();
2015-07-01 14:48:47 +08:00
margin: 0;
2016-09-19 16:16:13 +08:00
padding: 0;
2016-11-08 20:57:07 +08:00
font-size: @font-size-base;
height: @input-height-base;
2015-07-01 14:48:47 +08:00
display: inline-block;
border: @border-width-base @border-style-base @border-color-base;
2015-07-20 17:28:29 +08:00
border-radius: @border-radius-base;
2016-03-04 17:36:09 +08:00
width: 80px;
2015-07-01 14:48:47 +08:00
&-handler {
text-align: center;
2015-07-09 20:06:03 +08:00
line-height: 0;
height: 50%;
2015-07-01 14:48:47 +08:00
overflow: hidden;
color: @text-color-secondary;
2015-09-23 20:48:08 +08:00
position: relative;
transition: all 0.1s linear;
2015-10-14 16:27:06 +08:00
display: block;
width: 100%;
font-weight: bold;
&:active {
background: #f4f4f4;
2015-09-23 20:48:08 +08:00
}
2015-07-20 20:03:45 +08:00
&:hover &-up-inner,
2015-07-20 19:25:34 +08:00
&:hover &-down-inner {
color: @primary-5;
2015-07-15 15:50:44 +08:00
}
2015-07-01 14:48:47 +08:00
}
2015-11-26 19:32:55 +08:00
&-handler-up-inner,
&-handler-down-inner {
2015-07-09 20:06:03 +08:00
.iconfont-mixin();
line-height: 12px;
2015-07-01 14:48:47 +08:00
user-select: none;
2015-07-09 20:06:03 +08:00
position: absolute;
width: 12px;
height: 12px;
transition: all 0.1s linear;
2015-09-23 20:48:08 +08:00
.iconfont-size-under-12px(7px);
2015-07-09 20:06:03 +08:00
right: 4px;
color: @text-color-secondary;
2015-07-07 17:30:24 +08:00
}
2015-07-01 14:48:47 +08:00
&:hover {
2015-07-09 20:06:03 +08:00
.hover();
2015-07-01 14:48:47 +08:00
}
2015-07-09 20:06:03 +08:00
&-focused {
.active();
}
2015-07-01 14:48:47 +08:00
2015-07-09 20:06:03 +08:00
&-disabled {
.disabled();
2015-07-01 14:48:47 +08:00
}
&-input {
width: 100%;
2015-07-20 17:28:29 +08:00
text-align: left;
2015-07-01 14:48:47 +08:00
outline: 0;
-moz-appearance: textfield;
line-height: 26px;
height: 26px;
2015-09-23 20:48:08 +08:00
transition: all 0.3s linear;
2016-11-08 20:50:59 +08:00
color: @text-color;
2015-07-01 14:48:47 +08:00
border: 0;
2015-07-20 17:28:29 +08:00
border-radius: @border-radius-base;
padding: 0 7px;
2015-07-09 20:06:03 +08:00
&[disabled] {
.disabled();
}
2015-07-01 14:48:47 +08:00
}
2015-08-20 16:55:42 +08:00
2015-08-10 15:39:50 +08:00
&-lg {
padding: 0;
2015-09-23 20:48:08 +08:00
.@{input-number-prefix-cls}-handler {
2015-08-08 17:59:57 +08:00
height: 16px;
}
2015-08-10 15:39:50 +08:00
input {
height: 30px;
line-height: 30px;
2015-08-08 17:59:57 +08:00
}
2015-09-23 20:48:08 +08:00
.@{input-number-prefix-cls}-handler-up-inner {
2015-08-08 17:59:57 +08:00
top: 2px;
}
2015-09-23 20:48:08 +08:00
.@{input-number-prefix-cls}-handler-down-inner {
bottom: 2px;
}
.@{input-number-prefix-cls}-handler-up:hover {
height: 18px;
2015-08-08 17:59:57 +08:00
}
}
2015-08-10 15:39:50 +08:00
&-sm {
padding: 0;
2015-09-23 20:48:08 +08:00
.@{input-number-prefix-cls}-handler {
2015-08-08 17:59:57 +08:00
height: 11px;
}
2015-08-10 15:39:50 +08:00
input {
height: 20px;
line-height: 20px;
2015-08-08 17:59:57 +08:00
}
2015-09-23 20:48:08 +08:00
.@{input-number-prefix-cls}-handler-up-inner {
2015-08-08 17:59:57 +08:00
top: -1px;
}
2015-09-23 20:48:08 +08:00
.@{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;
2015-08-08 17:59:57 +08:00
}
}
2015-07-01 14:48:47 +08:00
&-handler-wrap {
border-left: @border-width-base @border-style-base @border-color-base;
2015-07-09 20:06:03 +08:00
width: 22px;
height: 100%;
background: @component-background;
2016-03-02 18:48:37 +08:00
position: absolute;
top: 0;
2016-03-02 18:48:37 +08:00
right: 0;
opacity: 0;
2016-09-19 16:16:13 +08:00
border-radius: 0 @border-radius-base @border-radius-base 0;
2015-10-09 20:52:41 +08:00
transition: opacity 0.24s linear 0.1s;
}
&:hover &-handler-wrap {
opacity: 1;
2015-07-01 14:48:47 +08:00
}
&-handler-up {
2015-07-07 17:30:24 +08:00
cursor: pointer;
2015-07-01 14:48:47 +08:00
&-inner {
2015-07-20 17:28:29 +08:00
top: 1px;
2015-07-01 14:48:47 +08:00
&:before {
2015-08-20 15:38:57 +08:00
text-align: center;
content: "\e61e";
2015-07-01 14:48:47 +08:00
}
}
2015-09-23 20:48:08 +08:00
&:hover {
height: 16px;
}
&:hover &-inner {
margin-top: 2px;
}
2015-07-01 14:48:47 +08:00
}
&-handler-down {
border-top: @border-width-base @border-style-base @border-color-base;
2015-09-23 20:48:08 +08:00
top: -1px;
2015-07-07 17:30:24 +08:00
cursor: pointer;
2015-07-01 14:48:47 +08:00
&-inner {
&:before {
2015-08-20 15:38:57 +08:00
text-align: center;
content: "\e61d";
2015-07-01 14:48:47 +08:00
}
}
2015-09-23 20:48:08 +08:00
&:hover {
height: 16px;
margin-top: -2px;
}
2015-07-01 14:48:47 +08:00
}
2015-11-26 19:32:55 +08:00
&-handler-down-disabled,
&-handler-up-disabled,
&-disabled {
2015-08-20 16:55:42 +08:00
.@{input-number-prefix-cls}-handler-down-inner,
.@{input-number-prefix-cls}-handler-up-inner {
2015-07-09 20:06:03 +08:00
.handler-disabled();
}
2015-07-01 14:48:47 +08:00
}
&-disabled {
2015-08-20 16:55:42 +08:00
.@{input-number-prefix-cls}-input {
2015-07-01 14:48:47 +08:00
opacity: 0.72;
cursor: not-allowed;
background-color: #f3f3f3;
}
2015-09-23 20:48:08 +08:00
.@{input-number-prefix-cls}-handler-wrap {
display: none;
}
2015-08-20 16:55:42 +08:00
.@{input-number-prefix-cls}-handler {
2015-07-01 14:48:47 +08:00
.handler-disabled();
}
}
}