Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: optimize Input presuffix style(#17414) #17508

Merged
merged 1 commit into from Jul 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions components/input/style/mixin.less
Expand Up @@ -373,9 +373,17 @@
color: @input-color;
line-height: 0;
transform: translateY(-50%);
background-color: #fff;
height: calc(100% - 2px);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要设 backgroud-color 的吧,还有 height 也有问题

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有多个suffix时.ant-input-suffix覆盖在input上面,设置background-color和height是想用.ant-input-suffix覆盖住input输入框。实际上这里判断suffix的数量来修改padding-right应该是更优的方案。
height这里应该把padding减去?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该用 padding,#fff 太粗暴了……

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zombieJ 请老朱背锅😂

:not(.anticon) {
line-height: @line-height-base;
}
.anticon {
position: relative;
vertical-align: top;
top: 50%;
transform: translateY(-50%);
}
}

.@{inputClass}-prefix {
Expand Down