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

235 lines
4.9 KiB
Plaintext
Raw Normal View History

meger feature to master (#16421) * use ul in list * update snapshot * update comment * feat: TreeSelect support `showSearch` in multiple mode (#15933) * update rc-tree-select * typo * update desc & snapshot * update desc & snapshot * check default showSearch * feat: table customizing variable (#15971) * feat: added table selected row color variable * fix: @table-selected-row-color default is inherit * feat: Upload support customize previewFile (#15984) * support preview file * use promise * dealy load * use canvas of render * use domHook of test * update demo * add snapshot * update types * update testcase * feat: form customizing variables (#15954) * fix: added styling form input background-color * feat: added '@form-warning-input-bg' variable * feat: added '@form-error-input-bg' variable * use li wrap with comment * feat: Support append theme less file with less-variable (#16118) * add override * add override support * update doc * feat: dropdown support set right icon * docs: update doc of dropdown component * style: format dropdown-button.md * test: update updateSnapshot * style: format dropdown-button.md * test: update updateSnapshot * test: update updateSnapshot * style: change style of dropdown-button demo * fix: fix document table order * feat: Support SkeletonAvatarProps.size accept number (#16078) (#16128) * chore:update style of demo * feat: Notification functions accept top, bottom and getContainer as arguments * drawer: add afterVisibleChange * rm onVisibleChange * update * feat: 🇭🇷 hr_HR locale (#16258) * Added Croatian locale * fixed lint error * :white_check_mark: Add test cases for hr_HR * :memo: update i18n documentation * feat: add `htmlFor` in Form.Item (#16278) * add htmlFor in Form.Item * update doc * feat: Button support `link` type (#16289) close #15892 * feat: Add Timeline.Item.position (#16148) (#16193) * fix: Timeline.pendingDot interface documentation there is a small problem (#16177) * feat: Add Timeline.Item.position (#16148) * doc: add version infomation for Timeline.Item.position * refactor: Update Tree & TreeSelect deps (#16330) * use CSSMotion * update snapshot * feat: Collapse support `expandIconPosition` (#16365) * update doc * support expandIconPosition * update snapshot * feat: Breadcrumb support DropDown (#16315) * breadcrumbs support drop down menu * update doc * add require less * fix test * fix md doc * less code * fix style warning * update snap * add children render test * feat: TreeNode support checkable * feat: add optional to support top and left slick dots (#16186) (#16225) * add optional to support top and left slick dots * update carousel snapshot * Update doc, add placement demo * update carousel placement demo snapshots * rename dots placement to position * update vertical as deprecated * rename dotsPosition to dotPosition * refine code * add warning testcase for vertical * remove unused warning * update expression * Additional test case for dotPosition * refactor: Upgrade `rc-tree-select` to support pure React motion (#16402) * upgrade `rc-tree-select` * update snapshot * 3.17.0 changelog * fix warning * fix review warning
2019-05-06 12:04:39 +08:00
@import '../../style/themes/index';
2018-12-07 20:02:01 +08:00
@import '../../style/mixins/index';
@import '../../input/style/mixin';
@import './affix';
2015-07-01 14:48:47 +08:00
2018-12-07 20:02:01 +08:00
@input-number-prefix-cls: ~'@{ant-prefix}-input-number';
@form-item-prefix-cls: ~'@{ant-prefix}-form-item';
2015-07-01 14:48:47 +08:00
2015-08-20 16:55:42 +08:00
.@{input-number-prefix-cls} {
.reset-component();
.input();
2019-04-15 10:52:00 +08:00
//== Style for input-group: input with label, with button or dropdown...
&-group {
.reset-component();
.input-group(~'@{input-number-prefix-cls}');
&-wrapper {
display: inline-block;
text-align: start;
vertical-align: top; // https://github.com/ant-design/ant-design/issues/6403
}
}
display: inline-block;
width: 90px;
2015-07-01 14:48:47 +08:00
margin: 0;
2016-09-19 16:16:13 +08:00
padding: 0;
border: @border-width-base @border-style-base @border-color-base;
2015-07-20 17:28:29 +08:00
border-radius: @border-radius-base;
2015-07-01 14:48:47 +08:00
&-handler {
2015-09-23 20:48:08 +08:00
position: relative;
2015-10-14 16:27:06 +08:00
display: block;
width: 100%;
height: 50%;
overflow: hidden;
color: @text-color-secondary;
font-weight: bold;
line-height: 0;
text-align: center;
border-left: @border-width-base @border-style-base @input-number-handler-border-color;
transition: all 0.1s linear;
&:active {
background: @input-number-handler-active-bg;
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 {
2019-08-29 10:29:58 +08:00
color: @input-number-handler-hover-bg;
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();
2019-04-15 10:52:00 +08:00
2015-07-09 20:06:03 +08:00
position: absolute;
right: 4px;
2015-07-09 20:06:03 +08:00
width: 12px;
height: 12px;
color: @text-color-secondary;
line-height: 12px;
transition: all 0.1s linear;
user-select: none;
2015-07-07 17:30:24 +08:00
}
2015-07-01 14:48:47 +08:00
&:hover {
2019-11-04 11:23:29 +08:00
.hover(@input-number-hover-border-color);
& + .@{form-item-prefix-cls}-children-icon {
opacity: 0;
transition: opacity 0.24s linear 0.24s;
}
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();
.@{input-number-prefix-cls}-input {
cursor: not-allowed;
}
.@{input-number-prefix-cls}-handler-wrap {
display: none;
}
2015-07-01 14:48:47 +08:00
}
&-readonly {
.@{input-number-prefix-cls}-handler-wrap {
display: none;
}
}
2015-07-01 14:48:47 +08:00
&-input {
width: 100%;
height: @input-height-base - 2px;
padding: 0 @control-padding-horizontal - 1px;
text-align: left;
background-color: transparent;
2015-07-01 14:48:47 +08:00
border: 0;
2015-07-20 17:28:29 +08:00
border-radius: @border-radius-base;
outline: 0;
transition: all 0.3s linear;
appearance: textfield !important;
.placeholder();
&[type='number']::-webkit-inner-spin-button,
&[type='number']::-webkit-outer-spin-button {
margin: 0;
/* stylelint-disable-next-line property-no-vendor-prefix */
-webkit-appearance: none;
appearance: none;
}
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;
font-size: @font-size-lg;
2015-08-08 17:59:57 +08:00
2015-08-10 15:39:50 +08:00
input {
height: @input-height-lg - 2px;
2015-08-08 17:59:57 +08:00
}
}
2015-08-10 15:39:50 +08:00
&-sm {
padding: 0;
2015-08-08 17:59:57 +08:00
2015-08-10 15:39:50 +08:00
input {
height: @input-height-sm - 2px;
padding: 0 @control-padding-horizontal-sm - 1px;
2015-08-08 17:59:57 +08:00
}
}
2015-07-01 14:48:47 +08:00
&-handler-wrap {
2016-03-02 18:48:37 +08:00
position: absolute;
top: 0;
2016-03-02 18:48:37 +08:00
right: 0;
width: 22px;
height: 100%;
2019-08-29 10:29:58 +08:00
background: @input-number-handler-bg;
2016-09-19 16:16:13 +08:00
border-radius: 0 @border-radius-base @border-radius-base 0;
opacity: 0;
2015-10-09 20:52:41 +08:00
transition: opacity 0.24s linear 0.1s;
// Fix input number inside Menu makes icon too large
// We arise the selector priority by nest selector here
// https://github.com/ant-design/ant-design/issues/14367
.@{input-number-prefix-cls}-handler {
.@{input-number-prefix-cls}-handler-up-inner,
.@{input-number-prefix-cls}-handler-down-inner {
display: flex;
align-items: center;
justify-content: center;
min-width: auto;
margin-right: 0;
font-size: 7px;
}
}
.@{input-number-prefix-cls}-borderless & {
border-left-width: 0;
}
}
&-handler-wrap:hover &-handler {
height: 40%;
}
&:hover &-handler-wrap,
&-focused &-handler-wrap {
opacity: 1;
2015-07-01 14:48:47 +08:00
}
&-handler-up {
border-top-right-radius: @border-radius-base;
2019-09-16 20:38:20 +08:00
cursor: pointer;
2015-07-01 14:48:47 +08:00
&-inner {
top: 50%;
margin-top: -5px;
2018-09-03 12:17:20 +08:00
text-align: center;
2015-07-01 14:48:47 +08:00
}
2015-09-23 20:48:08 +08:00
&:hover {
2017-08-04 17:58:32 +08:00
height: 60% !important;
2015-09-23 20:48:08 +08:00
}
2015-07-01 14:48:47 +08:00
}
&-handler-down {
top: 0;
border-top: @border-width-base @border-style-base @border-color-base;
border-bottom-right-radius: @border-radius-base;
2015-07-07 17:30:24 +08:00
cursor: pointer;
2015-07-01 14:48:47 +08:00
&-inner {
top: 50%;
2018-07-25 15:14:16 +08:00
text-align: center;
transform: translateY(-50%);
2015-07-01 14:48:47 +08:00
}
2015-09-23 20:48:08 +08:00
&:hover {
2017-08-04 17:58:32 +08:00
height: 60% !important;
2015-09-23 20:48:08 +08:00
}
.@{input-number-prefix-cls}-borderless & {
border-top-width: 0;
}
2015-07-01 14:48:47 +08:00
}
&-handler-up-disabled,
&-handler-down-disabled {
cursor: not-allowed;
}
&-handler-up-disabled:hover &-handler-up-inner,
&-handler-down-disabled:hover &-handler-down-inner {
color: @disabled-color;
}
&-borderless {
box-shadow: none;
}
// ===================== Out Of Range =====================
&-out-of-range {
input {
color: @error-color;
}
}
2015-07-01 14:48:47 +08:00
}
@import './rtl';