forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove magic number of style align (ant-design#20869)
* fix: Adjust baseline align * clean up * Select style * fix lint
- Loading branch information
Showing
7 changed files
with
163 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
@import './index'; | ||
@import './mixin'; | ||
|
||
.@{ant-prefix}-input { | ||
&-affix-wrapper { | ||
.input(); | ||
display: inline-flex; | ||
|
||
> .@{ant-prefix}-input { | ||
padding: 0; | ||
border: none; | ||
} | ||
} | ||
|
||
&-prefix, | ||
&-suffix { | ||
flex: none; | ||
} | ||
} | ||
|
||
// // Input with affix: prefix or suffix | ||
// .@{ant-prefix}-input-affix-wrapper { | ||
// .reset-component; | ||
// .input-affix-wrapper(~'@{ant-prefix}-input'); | ||
|
||
// // https://github.com/ant-design/ant-design/issues/6144 | ||
// .@{ant-prefix}-input { | ||
// min-height: 100%; // use min-height, assume that no smaller height to override | ||
// } | ||
// } | ||
|
||
// .input-affix-wrapper(@inputClass) { | ||
// position: relative; | ||
// display: inline-block; | ||
// width: 100%; | ||
// text-align: start; | ||
|
||
// &:hover .@{inputClass}:not(.@{inputClass}-disabled) { | ||
// .hover(); | ||
// } | ||
|
||
// .@{inputClass} { | ||
// position: relative; | ||
// text-align: inherit; | ||
// } | ||
|
||
// // Should not break align of icon & text | ||
// // https://github.com/ant-design/ant-design/issues/18087 | ||
// // https://github.com/ant-design/ant-design/issues/17414 | ||
// // https://github.com/ant-design/ant-design/pull/17684 | ||
// // https://codesandbox.io/embed/pensive-paper-di2wk | ||
// // https://codesandbox.io/embed/nifty-benz-gb7ml | ||
// .@{inputClass}-prefix, | ||
// .@{inputClass}-suffix { | ||
// position: absolute; | ||
// top: 50%; | ||
// z-index: 2; | ||
// display: flex; | ||
// align-items: center; | ||
// color: @input-icon-color; | ||
// line-height: 0; | ||
// transform: translateY(-50%); | ||
|
||
// :not(.anticon) { | ||
// line-height: @line-height-base; | ||
// } | ||
// } | ||
|
||
// .@{inputClass}-disabled ~ .@{inputClass}-suffix { | ||
// .anticon { | ||
// color: @disabled-color; | ||
// cursor: not-allowed; | ||
// } | ||
// } | ||
|
||
// .@{inputClass}-prefix { | ||
// left: @input-padding-horizontal-base + 1px; | ||
|
||
// .@{inputClass}-affix-wrapper-rtl& { | ||
// right: @input-padding-horizontal-base + 1px; | ||
// left: auto; | ||
// } | ||
// } | ||
|
||
// .@{inputClass}-suffix { | ||
// right: @input-padding-horizontal-base + 1px; | ||
|
||
// .@{inputClass}-affix-wrapper-rtl& { | ||
// right: auto; | ||
// left: @input-padding-horizontal-base + 1px; | ||
// } | ||
// } | ||
|
||
// .@{inputClass}:not(:first-child) { | ||
// padding-left: @input-padding-horizontal-base + @input-affix-width; | ||
// } | ||
|
||
// .@{inputClass}:not(:last-child) { | ||
// padding-right: @input-padding-horizontal-base + @input-affix-width; | ||
// } | ||
|
||
// // Needed to change priority of classes in rtl direction (last-child comes before first-child) | ||
// .@{inputClass}-affix-wrapper-rtl& .@{inputClass}:not(:last-child) { | ||
// padding-right: @input-padding-horizontal-base; | ||
// padding-left: @input-padding-horizontal-base + @input-affix-width; | ||
// } | ||
|
||
// .@{inputClass}-affix-wrapper-rtl& .@{inputClass}:not(:first-child) { | ||
// padding-right: @input-padding-horizontal-base + @input-affix-width; | ||
// padding-left: @input-padding-horizontal-base; | ||
// } | ||
|
||
// &.@{inputClass}-affix-wrapper-input-with-clear-btn .@{inputClass}:not(:last-child) { | ||
// padding-right: @input-padding-horizontal-base + @input-affix-with-clear-btn-width; | ||
|
||
// .@{inputClass}-affix-wrapper-rtl& { | ||
// padding-right: @input-padding-horizontal-base; | ||
// padding-left: @input-padding-horizontal-base + @input-affix-with-clear-btn-width; | ||
// } | ||
// } | ||
|
||
// &.@{inputClass}-affix-wrapper-textarea-with-clear-btn .@{inputClass} { | ||
// padding-right: 22px; | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters