@import '../../style/themes/index'; @import '../../style/mixins/index'; @import '../../input/style/mixin'; @import '../../button/style/mixin'; @import '../../grid/style/mixin'; @import './components'; @import './inline'; @import './horizontal'; @import './vertical'; @import './mixin'; @form-prefix-cls: ~'@{ant-prefix}-form'; @form-item-prefix-cls: ~'@{form-prefix-cls}-item'; @form-font-height: ceil(@font-size-base * @line-height-base); .@{form-prefix-cls} { .reset-component; .reset-form; .@{form-prefix-cls}-text { display: inline-block; padding-right: 8px; } } // ================================================================ // = Item = // ================================================================ .@{form-item-prefix-cls} { .reset-component; margin-bottom: @form-item-margin-bottom; vertical-align: top; &-with-help { margin-bottom: 0; } // ============================================================== // = Label = // ============================================================== &-label { display: inline-block; overflow: hidden; white-space: nowrap; text-align: right; vertical-align: middle; &-left { text-align: left; } > label { position: relative; // display: inline; display: inline-flex; align-items: center; height: 100%; max-height: @input-height-base; color: @label-color; > .@{iconfont-css-prefix} { font-size: @font-size-base; vertical-align: top; } &.@{form-item-prefix-cls}-required::before { display: inline-block; margin-right: 4px; color: @label-required-color; font-size: @font-size-base; font-family: SimSun, sans-serif; line-height: 1; content: '*'; .@{form-prefix-cls}-hide-required-mark & { display: none; } } &::after { & when (@form-item-trailing-colon=true) { content: ':'; } & when not (@form-item-trailing-colon=true) { content: ' '; } position: relative; top: -0.5px; margin: 0 @form-item-label-colon-margin-right 0 @form-item-label-colon-margin-left; } &.@{form-item-prefix-cls}-no-colon::after { content: ' '; } } } // ============================================================== // = Input = // ============================================================== &-control { display: flex; flex-direction: column; &:first-child:not([class^=~"'@{ant-prefix}-col-'"]):not([class*=~"' @{ant-prefix}-col-'"]) { width: 100%; } } &-control-input { position: relative; .clearfix; } &-explain, &-extra { clear: both; min-height: @form-item-margin-bottom; padding-top: floor((@form-item-margin-bottom - @form-font-height) / 2); color: @text-color-secondary; font-size: @font-size-base; line-height: @line-height-base; transition: color 0.3s @ease-out; // sync input color transition } // ================================================================ // = Status = // ================================================================ /* Some non-status related component style is in `components.less` */ &-has-feedback { // ========================= Input ========================= .@{ant-prefix}-input { padding-right: 24px; } // Fix issue: https://github.com/ant-design/ant-design/issues/7854 .@{ant-prefix}-input-search:not(.@{ant-prefix}-input-search-enter-button) { .@{ant-prefix}-input-suffix { right: 28px; } } .@{ant-prefix}-input-password-icon { margin-right: 18px; } // ======================== Switch ========================= .@{ant-prefix}-switch { margin: 2px 0 4px; } // ======================== Select ========================= // Fix overlapping between feedback icon and