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 '../../button/style/mixin';
|
|
|
|
@import '../../grid/style/mixin';
|
|
|
|
@import './mixin';
|
|
|
|
|
|
|
|
@form-prefix-cls: ~'@{ant-prefix}-form';
|
2017-09-27 22:32:49 +08:00
|
|
|
@form-component-height: @input-height-base;
|
2017-12-08 20:57:30 +08:00
|
|
|
@form-component-max-height: @input-height-lg;
|
2018-09-03 22:17:24 +08:00
|
|
|
@form-feedback-icon-size: @font-size-base;
|
2017-12-08 20:57:30 +08:00
|
|
|
@form-help-margin-top: (@form-component-height - @form-component-max-height) / 2 + 2px;
|
2019-03-18 18:44:08 +08:00
|
|
|
@form-explain-font-size: @font-size-base;
|
2019-02-20 11:42:53 +08:00
|
|
|
// Extends additional 1px to fix precision issue.
|
|
|
|
// https://github.com/ant-design/ant-design/issues/12803
|
|
|
|
// https://github.com/ant-design/ant-design/issues/8220
|
|
|
|
@form-explain-precision: 1px;
|
2019-03-18 18:44:08 +08:00
|
|
|
@form-explain-height: floor(@form-explain-font-size * @line-height-base);
|
2015-06-15 11:43:18 +08:00
|
|
|
|
2017-09-22 18:33:29 +08:00
|
|
|
.@{form-prefix-cls} {
|
|
|
|
.reset-component;
|
|
|
|
.reset-form;
|
2015-06-15 11:43:18 +08:00
|
|
|
}
|
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
.@{form-prefix-cls}-item-required::before {
|
2016-02-02 20:47:52 +08:00
|
|
|
display: inline-block;
|
|
|
|
margin-right: 4px;
|
2019-02-15 10:48:07 +08:00
|
|
|
color: @label-required-color;
|
|
|
|
font-size: @font-size-base;
|
2019-01-28 16:01:25 +08:00
|
|
|
font-family: SimSun, sans-serif;
|
2016-12-16 20:24:22 +08:00
|
|
|
line-height: 1;
|
2019-02-15 10:48:07 +08:00
|
|
|
content: '*';
|
2017-01-13 21:52:48 +08:00
|
|
|
.@{form-prefix-cls}-hide-required-mark & {
|
|
|
|
display: none;
|
|
|
|
}
|
2016-02-02 20:47:52 +08:00
|
|
|
}
|
|
|
|
|
2019-03-24 17:03:52 +08:00
|
|
|
.@{form-prefix-cls}-item-label > label {
|
|
|
|
color: @label-color;
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
& when (@form-item-trailing-colon=true) {
|
|
|
|
content: ':';
|
|
|
|
}
|
|
|
|
& when not (@form-item-trailing-colon=true) {
|
|
|
|
content: ' ';
|
|
|
|
}
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
top: -0.5px;
|
|
|
|
margin: 0 8px 0 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.@{form-prefix-cls}-item-no-colon::after {
|
|
|
|
content: ' ';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-17 15:05:12 +08:00
|
|
|
// Radio && Checkbox
|
2018-12-07 20:02:01 +08:00
|
|
|
input[type='radio'],
|
|
|
|
input[type='checkbox'] {
|
2015-07-17 15:05:12 +08:00
|
|
|
&[disabled],
|
2016-10-14 09:12:10 +08:00
|
|
|
&.disabled {
|
2016-11-08 20:45:56 +08:00
|
|
|
cursor: not-allowed;
|
2015-07-17 15:05:12 +08:00
|
|
|
}
|
|
|
|
}
|
2016-05-23 20:09:25 +08:00
|
|
|
|
2015-07-17 15:05:12 +08:00
|
|
|
// These classes are used directly on <label>s
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-radio-inline,
|
|
|
|
.@{ant-prefix}-radio-vertical,
|
|
|
|
.@{ant-prefix}-checkbox-inline,
|
|
|
|
.@{ant-prefix}-checkbox-vertical {
|
2016-10-14 09:12:10 +08:00
|
|
|
&.disabled {
|
2016-11-08 20:45:56 +08:00
|
|
|
cursor: not-allowed;
|
2015-07-17 15:05:12 +08:00
|
|
|
}
|
|
|
|
}
|
2016-07-28 08:39:03 +08:00
|
|
|
|
2015-07-17 15:05:12 +08:00
|
|
|
// These classes are used on elements with <label> descendants
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-radio,
|
|
|
|
.@{ant-prefix}-checkbox {
|
2016-10-14 09:12:10 +08:00
|
|
|
&.disabled {
|
2015-07-17 15:05:12 +08:00
|
|
|
label {
|
2016-11-08 20:45:56 +08:00
|
|
|
cursor: not-allowed;
|
2015-07-17 15:05:12 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-07 11:32:08 +08:00
|
|
|
// Form items
|
2016-04-27 20:44:36 +08:00
|
|
|
// You should wrap labels and controls in .@{form-prefix-cls}-item for optimum spacing
|
|
|
|
.@{form-prefix-cls}-item {
|
2017-09-22 18:33:29 +08:00
|
|
|
label {
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
> .@{iconfont-css-prefix} {
|
|
|
|
font-size: @font-size-base;
|
2019-02-15 10:48:07 +08:00
|
|
|
vertical-align: top;
|
2017-09-22 18:33:29 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.reset-component;
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2019-02-19 23:24:07 +08:00
|
|
|
margin-bottom: @form-item-margin-bottom;
|
2016-10-21 15:04:55 +08:00
|
|
|
vertical-align: top;
|
2015-07-07 11:32:08 +08:00
|
|
|
|
2016-01-22 14:56:35 +08:00
|
|
|
&-control {
|
2016-05-17 15:46:21 +08:00
|
|
|
position: relative;
|
2019-02-20 11:42:53 +08:00
|
|
|
line-height: @form-component-max-height;
|
2016-05-19 15:21:48 +08:00
|
|
|
.clearfix;
|
2016-01-22 14:56:35 +08:00
|
|
|
}
|
|
|
|
|
2018-02-11 11:44:49 +08:00
|
|
|
&-children {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
2019-02-19 23:24:07 +08:00
|
|
|
&-with-help {
|
2019-02-20 11:42:53 +08:00
|
|
|
margin-bottom: @form-item-margin-bottom - @form-explain-height - @form-help-margin-top;
|
2019-02-19 23:24:07 +08:00
|
|
|
}
|
|
|
|
|
2016-07-10 17:04:03 +08:00
|
|
|
&-label {
|
2017-03-10 19:19:36 +08:00
|
|
|
display: inline-block;
|
2016-10-07 14:34:25 +08:00
|
|
|
overflow: hidden;
|
2019-02-15 10:48:07 +08:00
|
|
|
line-height: @form-component-max-height - 0.0001px;
|
2016-10-07 14:34:25 +08:00
|
|
|
white-space: nowrap;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-align: right;
|
|
|
|
vertical-align: middle;
|
2015-07-22 17:17:47 +08:00
|
|
|
|
2019-03-07 15:14:27 +08:00
|
|
|
&-left {
|
|
|
|
text-align: left;
|
|
|
|
}
|
2015-07-07 11:32:08 +08:00
|
|
|
}
|
2015-07-16 22:57:47 +08:00
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-switch {
|
2017-12-22 15:22:22 +08:00
|
|
|
margin: 2px 0 4px;
|
2015-07-16 22:57:47 +08:00
|
|
|
}
|
2015-06-15 11:43:18 +08:00
|
|
|
}
|
|
|
|
|
2017-06-27 12:08:16 +08:00
|
|
|
.@{form-prefix-cls}-explain,
|
|
|
|
.@{form-prefix-cls}-extra {
|
2019-02-15 10:48:07 +08:00
|
|
|
clear: both;
|
2019-02-20 11:42:53 +08:00
|
|
|
min-height: @form-explain-height + @form-explain-precision;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-top: @form-help-margin-top;
|
2017-06-27 12:08:16 +08:00
|
|
|
color: @text-color-secondary;
|
2019-03-18 18:44:08 +08:00
|
|
|
font-size: @form-explain-font-size;
|
2019-02-20 11:42:53 +08:00
|
|
|
line-height: @line-height-base;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: color 0.3s @ease-out; // sync input color transition
|
2016-01-22 20:58:45 +08:00
|
|
|
}
|
|
|
|
|
2019-02-20 11:42:53 +08:00
|
|
|
.@{form-prefix-cls}-explain {
|
|
|
|
margin-bottom: -@form-explain-precision;
|
|
|
|
}
|
|
|
|
|
2016-04-27 20:44:36 +08:00
|
|
|
.@{form-prefix-cls}-extra {
|
2017-06-27 12:08:16 +08:00
|
|
|
padding-top: 4px;
|
2016-04-25 16:25:57 +08:00
|
|
|
}
|
|
|
|
|
2016-04-27 20:44:36 +08:00
|
|
|
.@{form-prefix-cls}-text {
|
2015-07-20 19:25:34 +08:00
|
|
|
display: inline-block;
|
2015-07-20 20:35:48 +08:00
|
|
|
padding-right: 8px;
|
2015-07-20 19:25:34 +08:00
|
|
|
}
|
|
|
|
|
2016-04-27 20:44:36 +08:00
|
|
|
.@{form-prefix-cls}-split {
|
2015-07-20 19:25:34 +08:00
|
|
|
display: block;
|
2015-07-17 15:05:12 +08:00
|
|
|
text-align: center;
|
2015-06-15 11:43:18 +08:00
|
|
|
}
|
|
|
|
|
2015-07-07 11:32:08 +08:00
|
|
|
// 表单下的输入框尺寸唯一: 大尺寸
|
|
|
|
form {
|
|
|
|
.has-feedback {
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-input {
|
2016-04-12 14:06:51 +08:00
|
|
|
padding-right: 24px;
|
2017-01-01 17:20:08 +08:00
|
|
|
}
|
|
|
|
|
2017-01-01 17:39:27 +08:00
|
|
|
// Fix overlapping between feedback icon and <Select>'s arrow.
|
|
|
|
// https://github.com/ant-design/ant-design/issues/4431
|
2017-07-21 10:07:04 +08:00
|
|
|
> .@{ant-prefix}-select .@{ant-prefix}-select-arrow,
|
|
|
|
> .@{ant-prefix}-select .@{ant-prefix}-select-selection__clear,
|
2017-07-11 12:14:35 +08:00
|
|
|
:not(.@{ant-prefix}-input-group-addon) > .@{ant-prefix}-select .@{ant-prefix}-select-arrow,
|
2018-12-07 20:02:01 +08:00
|
|
|
:not(.@{ant-prefix}-input-group-addon)
|
|
|
|
> .@{ant-prefix}-select
|
|
|
|
.@{ant-prefix}-select-selection__clear {
|
2017-07-11 12:14:35 +08:00
|
|
|
right: 28px;
|
2017-01-01 17:39:27 +08:00
|
|
|
}
|
2017-07-21 10:07:04 +08:00
|
|
|
> .@{ant-prefix}-select .@{ant-prefix}-select-selection-selected-value,
|
2018-12-07 20:02:01 +08:00
|
|
|
:not(.@{ant-prefix}-input-group-addon)
|
|
|
|
> .@{ant-prefix}-select
|
|
|
|
.@{ant-prefix}-select-selection-selected-value {
|
2017-07-11 12:14:35 +08:00
|
|
|
padding-right: 42px;
|
|
|
|
}
|
|
|
|
|
2017-01-01 17:39:27 +08:00
|
|
|
.@{ant-prefix}-cascader-picker {
|
|
|
|
&-arrow {
|
2017-11-10 17:15:02 +08:00
|
|
|
margin-right: 17px;
|
2017-01-01 17:39:27 +08:00
|
|
|
}
|
|
|
|
&-clear {
|
|
|
|
right: 28px;
|
|
|
|
}
|
2016-04-12 14:06:51 +08:00
|
|
|
}
|
2017-02-09 11:09:22 +08:00
|
|
|
|
2017-10-11 10:37:45 +08:00
|
|
|
// Fix issue: https://github.com/ant-design/ant-design/issues/7854
|
2017-10-11 10:43:59 +08:00
|
|
|
.@{ant-prefix}-input-search:not(.@{ant-prefix}-input-search-enter-button) {
|
2017-10-11 10:37:45 +08:00
|
|
|
.@{ant-prefix}-input-suffix {
|
|
|
|
right: 28px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-09 11:09:22 +08:00
|
|
|
// Fix issue: https://github.com/ant-design/ant-design/issues/4783
|
2017-09-06 20:17:20 +08:00
|
|
|
.@{ant-prefix}-calendar-picker,
|
|
|
|
.@{ant-prefix}-time-picker {
|
2017-02-09 11:09:22 +08:00
|
|
|
&-icon,
|
|
|
|
&-clear {
|
|
|
|
right: 28px;
|
|
|
|
}
|
|
|
|
}
|
2015-07-07 11:32:08 +08:00
|
|
|
}
|
2015-07-21 14:54:49 +08:00
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
textarea.@{ant-prefix}-input {
|
2015-12-16 20:13:18 +08:00
|
|
|
height: auto;
|
2018-11-27 00:36:01 +08:00
|
|
|
margin-bottom: 4px;
|
2015-12-16 20:13:18 +08:00
|
|
|
}
|
|
|
|
|
2015-07-07 11:32:08 +08:00
|
|
|
// input[type=file]
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-upload {
|
2015-07-08 13:17:14 +08:00
|
|
|
background: transparent;
|
2015-07-07 11:32:08 +08:00
|
|
|
}
|
2015-07-15 17:22:58 +08:00
|
|
|
|
2018-12-07 20:02:01 +08:00
|
|
|
input[type='radio'],
|
|
|
|
input[type='checkbox'] {
|
2015-07-17 15:05:12 +08:00
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
}
|
|
|
|
|
2015-07-15 17:22:58 +08:00
|
|
|
// Radios and checkboxes on same line
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-radio-inline,
|
|
|
|
.@{ant-prefix}-checkbox-inline {
|
2015-07-15 17:22:58 +08:00
|
|
|
display: inline-block;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-left: 8px;
|
2015-06-15 20:24:01 +08:00
|
|
|
font-weight: normal;
|
2019-02-15 10:48:07 +08:00
|
|
|
vertical-align: middle;
|
2015-06-15 20:24:01 +08:00
|
|
|
cursor: pointer;
|
2015-12-16 17:39:10 +08:00
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
2015-06-15 20:24:01 +08:00
|
|
|
}
|
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-checkbox-vertical,
|
|
|
|
.@{ant-prefix}-radio-vertical {
|
2015-07-17 15:05:12 +08:00
|
|
|
display: block;
|
2015-06-15 20:24:01 +08:00
|
|
|
}
|
2015-07-20 17:28:29 +08:00
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-checkbox-vertical + .@{ant-prefix}-checkbox-vertical,
|
|
|
|
.@{ant-prefix}-radio-vertical + .@{ant-prefix}-radio-vertical {
|
2016-06-27 17:22:03 +08:00
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
|
2018-07-23 15:07:40 +08:00
|
|
|
.@{ant-prefix}-input-number {
|
|
|
|
+ .@{form-prefix-cls}-text {
|
|
|
|
margin-left: 8px;
|
|
|
|
}
|
|
|
|
&-handler-wrap {
|
|
|
|
z-index: 2; // https://github.com/ant-design/ant-design/issues/6289
|
|
|
|
}
|
2015-07-20 17:28:29 +08:00
|
|
|
}
|
2015-07-20 19:25:34 +08:00
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-select,
|
|
|
|
.@{ant-prefix}-cascader-picker {
|
2015-07-20 19:25:34 +08:00
|
|
|
width: 100%;
|
|
|
|
}
|
2017-06-25 17:22:07 +08:00
|
|
|
|
2017-06-26 21:44:38 +08:00
|
|
|
// Don't impact select inside input group
|
|
|
|
.@{ant-prefix}-input-group .@{ant-prefix}-select,
|
|
|
|
.@{ant-prefix}-input-group .@{ant-prefix}-cascader-picker {
|
|
|
|
width: auto;
|
|
|
|
}
|
|
|
|
|
2017-11-29 11:20:38 +08:00
|
|
|
// fix input with addon position. https://github.com/ant-design/ant-design/issues/8243
|
2018-05-05 19:50:48 +08:00
|
|
|
:not(.@{ant-prefix}-input-group-wrapper) > .@{ant-prefix}-input-group,
|
2017-11-29 11:20:38 +08:00
|
|
|
.@{ant-prefix}-input-group-wrapper {
|
|
|
|
position: relative;
|
2018-01-12 15:54:10 +08:00
|
|
|
top: -1px;
|
2019-02-15 10:48:07 +08:00
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
2017-11-29 11:20:38 +08:00
|
|
|
}
|
2015-06-15 20:24:01 +08:00
|
|
|
}
|
|
|
|
|
2015-12-02 19:33:26 +08:00
|
|
|
// Input combined with select
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-input-group-wrap {
|
|
|
|
.@{ant-prefix}-select-selection {
|
2015-12-02 19:33:26 +08:00
|
|
|
border-top-left-radius: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
border-bottom-left-radius: 0;
|
2015-12-02 19:33:26 +08:00
|
|
|
&:hover {
|
2016-03-04 17:06:39 +08:00
|
|
|
border-color: @border-color-base;
|
2015-12-02 19:33:26 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-select-selection--single {
|
2017-12-08 20:57:30 +08:00
|
|
|
height: @input-height-lg;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-left: -1px;
|
2018-12-04 13:11:31 +08:00
|
|
|
background-color: fade(@black, 7%);
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-select-selection__rendered {
|
2015-12-02 19:33:26 +08:00
|
|
|
padding-right: 25px;
|
2019-02-15 10:48:07 +08:00
|
|
|
padding-left: 8px;
|
2015-12-02 19:33:26 +08:00
|
|
|
line-height: 30px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-select-open .@{ant-prefix}-select-selection {
|
2016-03-04 17:06:39 +08:00
|
|
|
border-color: @border-color-base;
|
2015-12-02 19:33:26 +08:00
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-10 19:19:36 +08:00
|
|
|
// Form layout
|
|
|
|
//== Vertical Form
|
2017-08-16 20:19:41 +08:00
|
|
|
.make-vertical-layout-label() {
|
2017-03-10 19:19:36 +08:00
|
|
|
display: block;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin: @form-vertical-label-margin;
|
|
|
|
padding: @form-vertical-label-padding;
|
2017-06-26 11:51:31 +08:00
|
|
|
line-height: @line-height-base;
|
2019-01-06 23:39:01 +08:00
|
|
|
white-space: initial;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-align: left;
|
2016-08-04 17:45:15 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
label::after {
|
2017-06-25 16:48:01 +08:00
|
|
|
display: none;
|
2016-08-04 17:45:15 +08:00
|
|
|
}
|
2017-03-10 19:19:36 +08:00
|
|
|
}
|
2017-08-11 17:05:25 +08:00
|
|
|
|
2017-08-16 20:19:41 +08:00
|
|
|
.make-vertical-layout() {
|
|
|
|
.@{form-prefix-cls}-item-label,
|
|
|
|
.@{form-prefix-cls}-item-control-wrapper {
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
.@{form-prefix-cls}-item-label {
|
|
|
|
.make-vertical-layout-label();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-15 11:25:58 +08:00
|
|
|
.@{form-prefix-cls}-vertical .@{form-prefix-cls}-item-label,
|
2017-08-11 17:05:25 +08:00
|
|
|
// when labelCol is 24, it is a vertical form
|
2017-03-15 11:25:58 +08:00
|
|
|
.@{ant-prefix}-col-24.@{form-prefix-cls}-item-label,
|
|
|
|
.@{ant-prefix}-col-xl-24.@{form-prefix-cls}-item-label {
|
2017-08-16 20:19:41 +08:00
|
|
|
.make-vertical-layout-label();
|
2017-03-15 11:25:58 +08:00
|
|
|
}
|
|
|
|
|
2018-01-12 14:55:04 +08:00
|
|
|
.@{form-prefix-cls}-vertical {
|
|
|
|
.@{form-prefix-cls}-item {
|
|
|
|
padding-bottom: 8px;
|
|
|
|
}
|
|
|
|
.@{form-prefix-cls}-item-control {
|
|
|
|
line-height: @line-height-base;
|
|
|
|
}
|
2019-02-20 11:42:53 +08:00
|
|
|
.@{form-prefix-cls}-explain {
|
|
|
|
margin-top: 2px;
|
|
|
|
margin-bottom: -4px - @form-explain-precision;
|
|
|
|
}
|
2018-01-12 14:55:04 +08:00
|
|
|
.@{form-prefix-cls}-extra {
|
|
|
|
margin-top: 2px;
|
|
|
|
margin-bottom: -4px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-15 11:25:58 +08:00
|
|
|
@media (max-width: @screen-xs-max) {
|
2017-08-16 20:19:41 +08:00
|
|
|
.make-vertical-layout();
|
2017-03-15 11:25:58 +08:00
|
|
|
.@{ant-prefix}-col-xs-24.@{form-prefix-cls}-item-label {
|
2017-08-16 20:19:41 +08:00
|
|
|
.make-vertical-layout-label();
|
2017-03-15 11:25:58 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: @screen-sm-max) {
|
|
|
|
.@{ant-prefix}-col-sm-24.@{form-prefix-cls}-item-label {
|
2017-08-16 20:19:41 +08:00
|
|
|
.make-vertical-layout-label();
|
2017-03-15 11:25:58 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: @screen-md-max) {
|
|
|
|
.@{ant-prefix}-col-md-24.@{form-prefix-cls}-item-label {
|
2017-08-16 20:19:41 +08:00
|
|
|
.make-vertical-layout-label();
|
2017-03-15 11:25:58 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: @screen-lg-max) {
|
|
|
|
.@{ant-prefix}-col-lg-24.@{form-prefix-cls}-item-label {
|
2017-08-16 20:19:41 +08:00
|
|
|
.make-vertical-layout-label();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: @screen-xl-max) {
|
|
|
|
.@{ant-prefix}-col-xl-24.@{form-prefix-cls}-item-label {
|
|
|
|
.make-vertical-layout-label();
|
2017-03-15 11:25:58 +08:00
|
|
|
}
|
|
|
|
}
|
2016-08-04 17:45:15 +08:00
|
|
|
|
2017-03-10 19:19:36 +08:00
|
|
|
//== Inline Form
|
|
|
|
.@{form-prefix-cls}-inline {
|
|
|
|
.@{form-prefix-cls}-item {
|
|
|
|
display: inline-block;
|
2017-06-26 17:05:42 +08:00
|
|
|
margin-right: 16px;
|
2017-03-10 19:19:36 +08:00
|
|
|
margin-bottom: 0;
|
2017-03-02 10:49:06 +08:00
|
|
|
|
2017-03-10 19:19:36 +08:00
|
|
|
&-with-help {
|
2019-02-20 11:42:53 +08:00
|
|
|
margin-bottom: @form-item-margin-bottom;
|
2016-03-08 23:53:09 +08:00
|
|
|
}
|
|
|
|
|
2018-10-26 23:53:57 +08:00
|
|
|
> .@{form-prefix-cls}-item-control-wrapper,
|
|
|
|
> .@{form-prefix-cls}-item-label {
|
2015-12-08 17:48:12 +08:00
|
|
|
display: inline-block;
|
2018-10-26 23:53:57 +08:00
|
|
|
vertical-align: top;
|
2015-12-08 17:48:12 +08:00
|
|
|
}
|
2017-03-10 19:19:36 +08:00
|
|
|
}
|
2015-06-15 20:24:01 +08:00
|
|
|
|
2017-03-10 19:19:36 +08:00
|
|
|
.@{form-prefix-cls}-text {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
2016-02-20 17:41:40 +08:00
|
|
|
|
2017-03-10 19:19:36 +08:00
|
|
|
.has-feedback {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
2015-07-07 11:32:08 +08:00
|
|
|
}
|
2015-06-15 20:24:01 +08:00
|
|
|
|
2015-06-15 11:43:18 +08:00
|
|
|
// Validation state
|
2015-11-26 19:32:55 +08:00
|
|
|
.has-success,
|
|
|
|
.has-warning,
|
|
|
|
.has-error,
|
|
|
|
.is-validating {
|
2018-07-25 11:42:26 +08:00
|
|
|
&.has-feedback .@{form-prefix-cls}-item-children-icon {
|
2015-08-03 13:34:40 +08:00
|
|
|
position: absolute;
|
2018-02-11 11:44:49 +08:00
|
|
|
top: 50%;
|
2015-08-03 13:34:40 +08:00
|
|
|
right: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
z-index: 1;
|
2017-12-22 17:35:55 +08:00
|
|
|
width: @form-component-height;
|
2018-02-11 11:44:49 +08:00
|
|
|
height: 20px;
|
|
|
|
margin-top: -10px;
|
2017-08-10 11:34:08 +08:00
|
|
|
font-size: @form-feedback-icon-size;
|
2019-02-15 10:48:07 +08:00
|
|
|
line-height: 20px;
|
|
|
|
text-align: center;
|
|
|
|
visibility: visible;
|
2018-12-07 20:02:01 +08:00
|
|
|
animation: zoomIn 0.3s @ease-out-back;
|
2019-02-15 10:48:07 +08:00
|
|
|
pointer-events: none;
|
2018-08-14 18:20:45 +08:00
|
|
|
|
|
|
|
& svg {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
margin: auto;
|
|
|
|
}
|
2015-08-20 14:58:09 +08:00
|
|
|
}
|
|
|
|
}
|
2015-11-18 15:41:30 +08:00
|
|
|
|
|
|
|
.has-success {
|
2018-07-25 11:42:26 +08:00
|
|
|
&.has-feedback .@{form-prefix-cls}-item-children-icon {
|
2015-08-03 13:34:40 +08:00
|
|
|
color: @success-color;
|
2019-02-15 10:48:07 +08:00
|
|
|
animation-name: diffZoomIn1 !important;
|
2015-07-07 11:32:08 +08:00
|
|
|
}
|
2015-06-15 11:43:18 +08:00
|
|
|
}
|
2015-08-03 13:34:40 +08:00
|
|
|
|
2015-06-15 11:43:18 +08:00
|
|
|
.has-warning {
|
2019-05-06 12:04:39 +08:00
|
|
|
.form-control-validation(@warning-color; @warning-color; @form-warning-input-bg;);
|
2015-08-03 13:34:40 +08:00
|
|
|
|
2018-07-25 11:42:26 +08:00
|
|
|
&.has-feedback .@{form-prefix-cls}-item-children-icon {
|
2015-08-03 13:34:40 +08:00
|
|
|
color: @warning-color;
|
2017-11-29 21:00:16 +08:00
|
|
|
animation-name: diffZoomIn3 !important;
|
2015-08-03 13:34:40 +08:00
|
|
|
}
|
|
|
|
|
2016-04-27 20:44:36 +08:00
|
|
|
//select
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-select {
|
2015-08-03 13:34:40 +08:00
|
|
|
&-selection {
|
|
|
|
border-color: @warning-color;
|
2018-12-18 16:53:45 +08:00
|
|
|
&:hover {
|
|
|
|
border-color: @warning-color;
|
|
|
|
}
|
2015-08-03 13:34:40 +08:00
|
|
|
}
|
2016-11-16 20:13:00 +08:00
|
|
|
&-open .@{ant-prefix}-select-selection,
|
|
|
|
&-focused .@{ant-prefix}-select-selection {
|
|
|
|
.active(@warning-color);
|
2015-08-03 13:34:40 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-16 20:13:00 +08:00
|
|
|
// arrow and icon
|
2019-02-15 10:48:07 +08:00
|
|
|
.@{ant-prefix}-calendar-picker-icon::after,
|
|
|
|
.@{ant-prefix}-time-picker-icon::after,
|
|
|
|
.@{ant-prefix}-picker-icon::after,
|
2016-11-16 20:13:00 +08:00
|
|
|
.@{ant-prefix}-select-arrow,
|
|
|
|
.@{ant-prefix}-cascader-picker-arrow {
|
2015-11-19 14:11:34 +08:00
|
|
|
color: @warning-color;
|
|
|
|
}
|
|
|
|
|
2016-09-13 17:06:11 +08:00
|
|
|
//input-number, timepicker
|
2016-09-15 01:21:48 +08:00
|
|
|
.@{ant-prefix}-input-number,
|
|
|
|
.@{ant-prefix}-time-picker-input {
|
2015-10-15 19:59:21 +08:00
|
|
|
border-color: @warning-color;
|
2016-11-11 15:08:02 +08:00
|
|
|
&-focused,
|
|
|
|
&:focus {
|
|
|
|
.active(@warning-color);
|
|
|
|
}
|
2015-11-18 15:41:30 +08:00
|
|
|
&:not([disabled]):hover {
|
|
|
|
border-color: @warning-color;
|
|
|
|
}
|
2015-10-15 19:59:21 +08:00
|
|
|
}
|
2017-10-09 13:46:56 +08:00
|
|
|
|
|
|
|
.@{ant-prefix}-cascader-picker:focus .@{ant-prefix}-cascader-input {
|
|
|
|
.active(@warning-color);
|
|
|
|
}
|
2015-06-15 11:43:18 +08:00
|
|
|
}
|
2015-08-03 13:34:40 +08:00
|
|
|
|
2015-06-15 11:43:18 +08:00
|
|
|
.has-error {
|
2019-05-06 12:04:39 +08:00
|
|
|
.form-control-validation(@error-color; @error-color; @form-error-input-bg;);
|
2015-08-03 13:34:40 +08:00
|
|
|
|
2018-07-25 11:42:26 +08:00
|
|
|
&.has-feedback .@{form-prefix-cls}-item-children-icon {
|
2015-08-03 13:34:40 +08:00
|
|
|
color: @error-color;
|
2017-11-29 21:00:16 +08:00
|
|
|
animation-name: diffZoomIn2 !important;
|
2015-08-03 13:34:40 +08:00
|
|
|
}
|
2015-08-20 14:58:09 +08:00
|
|
|
|
2016-04-27 20:44:36 +08:00
|
|
|
//select
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-select {
|
2015-08-03 13:34:40 +08:00
|
|
|
&-selection {
|
|
|
|
border-color: @error-color;
|
2018-12-18 16:53:45 +08:00
|
|
|
&:hover {
|
|
|
|
border-color: @error-color;
|
|
|
|
}
|
2016-11-09 22:25:39 +08:00
|
|
|
}
|
2016-11-16 20:13:00 +08:00
|
|
|
&-open .@{ant-prefix}-select-selection,
|
|
|
|
&-focused .@{ant-prefix}-select-selection {
|
2016-08-31 17:04:24 +08:00
|
|
|
.active(@error-color);
|
2015-08-03 13:34:40 +08:00
|
|
|
}
|
|
|
|
}
|
2015-10-15 19:59:21 +08:00
|
|
|
|
2018-01-31 10:47:25 +08:00
|
|
|
.@{ant-prefix}-select.@{ant-prefix}-select-auto-complete {
|
|
|
|
.@{ant-prefix}-input:focus {
|
|
|
|
border-color: @error-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-08 16:20:01 +08:00
|
|
|
.@{ant-prefix}-input-group-addon .@{ant-prefix}-select {
|
|
|
|
&-selection {
|
|
|
|
border-color: transparent;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-16 20:13:00 +08:00
|
|
|
// arrow and icon
|
2019-02-15 10:48:07 +08:00
|
|
|
.@{ant-prefix}-calendar-picker-icon::after,
|
|
|
|
.@{ant-prefix}-time-picker-icon::after,
|
|
|
|
.@{ant-prefix}-picker-icon::after,
|
2016-11-16 20:13:00 +08:00
|
|
|
.@{ant-prefix}-select-arrow,
|
|
|
|
.@{ant-prefix}-cascader-picker-arrow {
|
2015-11-19 14:11:34 +08:00
|
|
|
color: @error-color;
|
|
|
|
}
|
|
|
|
|
2016-09-13 17:06:11 +08:00
|
|
|
//input-number, timepicker
|
2016-09-15 01:21:48 +08:00
|
|
|
.@{ant-prefix}-input-number,
|
|
|
|
.@{ant-prefix}-time-picker-input {
|
2015-10-15 19:59:21 +08:00
|
|
|
border-color: @error-color;
|
2016-11-11 15:08:02 +08:00
|
|
|
&-focused,
|
2016-11-09 22:25:39 +08:00
|
|
|
&:focus {
|
|
|
|
.active(@error-color);
|
|
|
|
}
|
2015-11-18 15:41:30 +08:00
|
|
|
&:not([disabled]):hover {
|
|
|
|
border-color: @error-color;
|
|
|
|
}
|
2015-10-15 19:59:21 +08:00
|
|
|
}
|
2016-11-11 15:08:02 +08:00
|
|
|
.@{ant-prefix}-mention-wrapper {
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{ant-prefix}-mention-editor {
|
2016-11-11 15:08:02 +08:00
|
|
|
&,
|
|
|
|
&:not([disabled]):hover {
|
2016-07-20 18:56:44 +08:00
|
|
|
border-color: @error-color;
|
|
|
|
}
|
|
|
|
}
|
2017-09-25 22:53:11 +08:00
|
|
|
&.@{ant-prefix}-mention-active:not([disabled]) .@{ant-prefix}-mention-editor,
|
2016-11-11 15:08:02 +08:00
|
|
|
.@{ant-prefix}-mention-editor:not([disabled]):focus {
|
|
|
|
.active(@error-color);
|
|
|
|
}
|
2016-07-20 18:56:44 +08:00
|
|
|
}
|
2017-10-09 13:46:56 +08:00
|
|
|
|
|
|
|
.@{ant-prefix}-cascader-picker:focus .@{ant-prefix}-cascader-input {
|
|
|
|
.active(@error-color);
|
|
|
|
}
|
2018-11-29 14:37:54 +08:00
|
|
|
|
|
|
|
// transfer
|
|
|
|
.@{ant-prefix}-transfer {
|
|
|
|
&-list {
|
|
|
|
border-color: @error-color;
|
|
|
|
|
|
|
|
&-search:not([disabled]) {
|
|
|
|
border-color: @input-border-color;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
.hover();
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
.active();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-08-03 13:34:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.is-validating {
|
2018-07-25 11:42:26 +08:00
|
|
|
&.has-feedback .@{form-prefix-cls}-item-children-icon {
|
2015-08-03 13:34:40 +08:00
|
|
|
display: inline-block;
|
2017-01-14 20:59:37 +08:00
|
|
|
color: @primary-color;
|
2015-08-03 13:34:40 +08:00
|
|
|
}
|
2015-06-15 11:43:18 +08:00
|
|
|
}
|
2015-08-20 14:58:09 +08:00
|
|
|
|
2019-02-19 23:24:07 +08:00
|
|
|
.@{ant-prefix}-advanced-search-form {
|
|
|
|
.@{form-prefix-cls}-item {
|
|
|
|
margin-bottom: @form-item-margin-bottom;
|
|
|
|
|
|
|
|
&-with-help {
|
2019-02-20 11:42:53 +08:00
|
|
|
margin-bottom: @form-item-margin-bottom - @form-explain-height - @form-help-margin-top;
|
2019-02-19 23:24:07 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-11 17:05:25 +08:00
|
|
|
.show-help-motion(@className, @keyframeName, @duration: @animation-duration-slow) {
|
|
|
|
.make-motion(@className, @keyframeName, @duration);
|
|
|
|
.@{className}-enter,
|
|
|
|
.@{className}-appear {
|
|
|
|
opacity: 0;
|
|
|
|
animation-timing-function: @ease-in-out;
|
|
|
|
}
|
|
|
|
.@{className}-leave {
|
|
|
|
animation-timing-function: @ease-in-out;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-10 21:48:11 +08:00
|
|
|
.show-help-motion(show-help, antShowHelp, 0.3s);
|
2017-08-11 17:05:25 +08:00
|
|
|
|
|
|
|
@keyframes antShowHelpIn {
|
|
|
|
0% {
|
|
|
|
transform: translateY(-5px);
|
2019-02-15 10:48:07 +08:00
|
|
|
opacity: 0;
|
2017-08-11 17:05:25 +08:00
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform: translateY(0);
|
2019-02-15 10:48:07 +08:00
|
|
|
opacity: 1;
|
2017-08-11 17:05:25 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes antShowHelpOut {
|
|
|
|
to {
|
|
|
|
transform: translateY(-5px);
|
2019-02-15 10:48:07 +08:00
|
|
|
opacity: 0;
|
2017-08-11 17:05:25 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-18 15:41:30 +08:00
|
|
|
// need there different zoom animation
|
|
|
|
// otherwise won't trigger anim
|
|
|
|
@keyframes diffZoomIn1 {
|
2015-11-26 19:32:55 +08:00
|
|
|
0% {
|
2015-08-20 14:58:09 +08:00
|
|
|
transform: scale(0);
|
|
|
|
}
|
2015-11-26 19:32:55 +08:00
|
|
|
100% {
|
2015-08-20 14:58:09 +08:00
|
|
|
transform: scale(1);
|
|
|
|
}
|
|
|
|
}
|
2015-11-18 15:41:30 +08:00
|
|
|
|
|
|
|
@keyframes diffZoomIn2 {
|
2015-11-26 19:32:55 +08:00
|
|
|
0% {
|
2015-11-18 15:41:30 +08:00
|
|
|
transform: scale(0);
|
|
|
|
}
|
2015-11-26 19:32:55 +08:00
|
|
|
100% {
|
2015-11-18 15:41:30 +08:00
|
|
|
transform: scale(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes diffZoomIn3 {
|
2015-11-26 19:32:55 +08:00
|
|
|
0% {
|
2015-08-20 14:58:09 +08:00
|
|
|
transform: scale(0);
|
|
|
|
}
|
2015-11-26 19:32:55 +08:00
|
|
|
100% {
|
2015-08-20 14:58:09 +08:00
|
|
|
transform: scale(1);
|
|
|
|
}
|
|
|
|
}
|