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

[4.x] Select/Input placeholder have different padding-left and color #20850

Closed
afc163 opened this issue Jan 13, 2020 · 10 comments · Fixed by #20861
Closed

[4.x] Select/Input placeholder have different padding-left and color #20850

afc163 opened this issue Jan 13, 2020 · 10 comments · Fixed by #20861
Assignees
Labels
4.x 🐛 Bug 👷🏻‍♂️ Someone working on it

Comments

@afc163
Copy link
Member

@afc163 afc163 commented Jan 13, 2020

4.x:https://codesandbox.io/s/antd-reproduction-template-spwm9
3.x:https://codesandbox.io/s/antd-reproduction-template-7dq7e

image

@afc163 afc163 added 🐛 Bug 4.x labels Jan 13, 2020
@afc163 afc163 changed the title [4.x] Select placeholder has wrong padding and color [4.x] Select/Input placeholder have different padding-left and color Jan 13, 2020
@xrkffgg
Copy link
Member

@xrkffgg xrkffgg commented Jan 13, 2020

  • 我这里看他们的颜色是一样的,都是 rgba(0, 0, 0, 0.65)

  • 多选的 left 有点不一致,其他都是 11px

多选的是 12px

.ant-select-multiple .ant-select-selection-placeholder {
    left: 12px;
}

@afc163
Copy link
Member Author

@afc163 afc163 commented Jan 13, 2020

确实,颜色问题只在 Firefox 下可重现。padding 问题都有。

@xrkffgg
Copy link
Member

@xrkffgg xrkffgg commented Jan 13, 2020

@afc163
后两种的 placeholder 是包在了 input 中
可以通过设置 input 的 placeholder 强制颜色 可以达到统一

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: rgba(0, 0, 0, 0.65) !important;
}
input:-moz-placeholder,
textarea:-moz-placeholder {
  color: rgba(0, 0, 0, 0.65) !important;
}
input::-moz-placeholder,
textarea::-moz-placeholder {
  color: rgba(0, 0, 0, 0.65) !important;
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: rgba(0, 0, 0, 0.65) !important;
}

但是这样 谷歌上 颜色 又不一致了 😂😂😂

@afc163
Copy link
Member Author

@afc163 afc163 commented Jan 13, 2020

发现是我的锅 747dc4d#diff-68c855179f0ac7cd7c5a5269b185ac20L6

@afc163
Copy link
Member Author

@afc163 afc163 commented Jan 13, 2020

修了颜色的问题 e3b0104 ,留着 padding 的问题你们来看看。

@xrkffgg
Copy link
Member

@xrkffgg xrkffgg commented Jan 13, 2020

@zombieJ 有人在改了吗?

@zombieJ
Copy link
Member

@zombieJ zombieJ commented Jan 13, 2020

@xrkffgg, 我加了一个 someone working 的 label 额……

@xrkffgg
Copy link
Member

@xrkffgg xrkffgg commented Jan 13, 2020

@zombieJ 恩,那我关了

@zombieJ
Copy link
Member

@zombieJ zombieJ commented Jan 13, 2020

不用
在你的上面继续改就行了,我已经把我的关了。

@fjc0k
Copy link
Contributor

@fjc0k fjc0k commented Jan 13, 2020

颜色这个,Chrome 也是这样的啊,Select 和 Input 占位文字的效果明细不同:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 🐛 Bug 👷🏻‍♂️ Someone working on it
Projects
None yet
4 participants