Skip to content

Commit

Permalink
fix(antd): fix form size=large bug (#1998) (#2008)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grapedge authored Aug 13, 2021
1 parent 05799d4 commit 3edd6e8
Showing 1 changed file with 52 additions and 38 deletions.
90 changes: 52 additions & 38 deletions packages/antd/src/form-item/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
display: block;
}

.@{ant-prefix}-checkbox-vertical+.@{ant-prefix}-checkbox-vertical,
.@{ant-prefix}-radio-vertical+.@{ant-prefix}-radio-vertical {
.@{ant-prefix}-checkbox-vertical + .@{ant-prefix}-checkbox-vertical,
.@{ant-prefix}-radio-vertical + .@{ant-prefix}-radio-vertical {
margin-left: 0;
}

.@{ant-prefix}-input-number {
width: 100%;

+.@{ant-prefix}-form-text {
+ .@{ant-prefix}-form-text {
margin-left: 8px;
}

Expand Down Expand Up @@ -112,13 +112,13 @@
}

.@{form-item-cls}-label-align-left {
>.@{form-item-cls}-label {
> .@{form-item-cls}-label {
justify-content: flex-start;
}
}

.@{form-item-cls}-label-align-right {
>.@{form-item-cls}-label {
> .@{form-item-cls}-label {
justify-content: flex-end;
}
}
Expand Down Expand Up @@ -228,14 +228,14 @@
min-height: @height-sm - 2;
}

.@{form-item-cls}-label>label {
.@{form-item-cls}-label > label {
height: @height-sm - 2;
}

.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input-number,
.@{ant-prefix}-picker {
padding: 0px 7px;
padding: 0px 11px;

input {
height: @height-sm - 2;
Expand All @@ -253,8 +253,9 @@
}
}

.@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input) .@{ant-prefix}-select-selector {
padding: 0px 7px;
.@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input)
.@{ant-prefix}-select-selector {
padding: 0px 11px;
height: @height-sm - 2;
font-size: @font-size-sm;
line-height: @height-sm;
Expand All @@ -280,7 +281,8 @@
}
}

.@{ant-prefix}-select-multiple:not(.@{ant-prefix}-select-customize-input) .@{ant-prefix}-select-selector {
.@{ant-prefix}-select-multiple:not(.@{ant-prefix}-select-customize-input)
.@{ant-prefix}-select-selector {
padding: 0px 2px;
height: @height-sm - 2;
font-size: @font-size-sm;
Expand Down Expand Up @@ -361,10 +363,20 @@
min-height: @height-lg - 2;
}

.@{ant-prefix}-input {
font-size: @font-size-lg;
}

.@{ant-prefix}-input-number {
font-size: @font-size-lg;
input {
height: @height-lg - 2;
}
}

.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input-number,
.@{ant-prefix}-picker {
padding: 0px 7px;
padding: 0px 11px;
line-height: @height-lg - 2;

input {
Expand All @@ -387,14 +399,15 @@
height: @height-lg - 2;

input {
padding: 0px 7px;
padding: 0px 11px;
height: @height-lg - 2;
font-size: @font-size-lg;
}
}

.@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input) .@{ant-prefix}-select-selector {
padding: 0px 7px;
.@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input)
.@{ant-prefix}-select-selector {
padding: 0px 11px;
height: @height-lg;
font-size: @font-size-lg;
line-height: @height-lg;
Expand All @@ -420,7 +433,8 @@
}
}

.@{ant-prefix}-select-multiple:not(.@{ant-prefix}-select-customize-input) .@{ant-prefix}-select-selector {
.@{ant-prefix}-select-multiple:not(.@{ant-prefix}-select-customize-input)
.@{ant-prefix}-select-selector {
padding: 0px 2px;
height: @height-lg - 2;
font-size: @font-size-lg;
Expand Down Expand Up @@ -541,10 +555,10 @@
}

.@{form-item-cls}-fullness {
>.@{form-item-cls}-control {
>.@{form-item-cls}-control-content {
>.@{form-item-cls}-control-content-component {
>*:first-child {
> .@{form-item-cls}-control {
> .@{form-item-cls}-control-content {
> .@{form-item-cls}-control-content-component {
> *:first-child {
width: 100%;
}
}
Expand All @@ -563,7 +577,8 @@
.@{ant-prefix}-input-number,
.@{ant-prefix}-picker,
.@{ant-prefix}-cascader-picker:focus .@{ant-prefix}-cascader-input,
.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input) .@{ant-prefix}-select-selector,
.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input)
.@{ant-prefix}-select-selector,
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input {
border: none !important;
Expand All @@ -572,12 +587,12 @@
}

.@{form-item-cls}-bordered-none {

.@{ant-prefix}-input-number,
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-picker,
.@{ant-prefix}-cascader-picker:focus .@{ant-prefix}-cascader-input,
.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input) .@{ant-prefix}-select-selector,
.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input)
.@{ant-prefix}-select-selector,
.@{ant-prefix}-input {
border: none !important;
box-shadow: none !important;
Expand All @@ -601,7 +616,8 @@
.@{ant-prefix}-input-number,
.@{ant-prefix}-picker,
.@{ant-prefix}-cascader-picker:focus .@{ant-prefix}-cascader-input,
.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input) .@{ant-prefix}-select-selector,
.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input)
.@{ant-prefix}-select-selector,
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input {
border: none !important;
Expand Down Expand Up @@ -633,7 +649,8 @@
.@{ant-prefix}-input-number,
.@{ant-prefix}-picker,
.@{ant-prefix}-cascader-picker:focus .@{ant-prefix}-cascader-input,
.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input) .@{ant-prefix}-select-selector,
.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input)
.@{ant-prefix}-select-selector,
.@{ant-prefix}-input {
.active();
}
Expand All @@ -648,7 +665,6 @@
}

.@{form-item-cls}-error {

.@{ant-prefix}-select-selector,
.@{ant-prefix}-cascader-picker,
.@{ant-prefix}-picker,
Expand All @@ -657,7 +673,7 @@
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input {
border-color: @error-color !important;
border-color: @error-color !important;
}

.@{ant-prefix}-select-selector,
Expand All @@ -668,13 +684,13 @@
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input-affix-wrapper:hover,
.@{ant-prefix}-input:hover {
border-color: @error-color !important;
border-color: @error-color !important;
}

.@{ant-prefix}-select:not(.@{ant-prefix}-select-disabled):not(.@{ant-prefix}-select-customize-input) {
.@{ant-prefix}-select-selector {
background-color: @form-error-input-bg;
border-color: @error-color !important;
border-color: @error-color !important;
}

&.@{ant-prefix}-select-open .@{ant-prefix}-select-selector,
Expand Down Expand Up @@ -725,7 +741,6 @@
}

.@{form-item-cls}-warning {

.@{ant-prefix}-select-selector,
.@{ant-prefix}-cascader-picker,
.@{ant-prefix}-picker,
Expand All @@ -734,7 +749,7 @@
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input {
border-color: @warning-color !important;
border-color: @warning-color !important;
}

.@{ant-prefix}-select-selector,
Expand All @@ -745,13 +760,13 @@
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input-affix-wrapper:hover,
.@{ant-prefix}-input:hover {
border-color: @warning-color !important;
border-color: @warning-color !important;
}

.@{ant-prefix}-select:not(.@{ant-prefix}-select-disabled):not(.@{ant-prefix}-select-customize-input) {
.@{ant-prefix}-select-selector {
background-color: @form-warning-input-bg;
border-color: @warning-color !important;
border-color: @warning-color !important;
}

&.@{ant-prefix}-select-open .@{ant-prefix}-select-selector,
Expand Down Expand Up @@ -790,7 +805,6 @@
}

.@{form-item-cls}-success {

.@{ant-prefix}-select-selector,
.@{ant-prefix}-cascader-picker,
.@{ant-prefix}-picker,
Expand All @@ -799,7 +813,7 @@
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input {
border-color: @success-color !important;
border-color: @success-color !important;
}

.@{ant-prefix}-select-selector,
Expand All @@ -810,15 +824,15 @@
.@{ant-prefix}-input-affix-wrapper,
.@{ant-prefix}-input-affix-wrapper:hover,
.@{ant-prefix}-input:hover {
border-color: @success-color !important;
border-color: @success-color !important;
}

.@{ant-prefix}-input-affix-wrapper-focused,
.@{ant-prefix}-input-affix-wrapper:focus,
.@{ant-prefix}-input-focused,
.@{ant-prefix}-input:focus {
border-color: @success-color !important;
border-color: @success-color !important;
border-right-width: 1px !important;
outline: 0;
}
}
}

0 comments on commit 3edd6e8

Please sign in to comment.