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

Input: inputFontSize 不止改变字体大小,也会强制改变 Input 的高度 #48947

Open
guoyunhe opened this issue May 16, 2024 · 6 comments

Comments

@guoyunhe
Copy link
Contributor

guoyunhe commented May 16, 2024

Reproduction link

Edit on StackBlitz

Steps to reproduce

在 ConfigProvider 中设置主题,定义 Input 的 inputFontSize

What is expected?

仅改变 Input 的字体大小

What is actually happening?

Input 的高度也被改变了,且 controlHeight 设置失效

image

Environment Info
antd 5.17.2
React 18.2.0
System macOS
Browser Chrome 121
Copy link

stackblitz bot commented May 16, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@wanpan11
Copy link
Contributor

目前来看是字体变小后 元素的高度也跟着变小了,
controlHeight 是起作用的,但是因为 元素的高度 变了造成计算出来的值不对了

image

@guoyunhe
Copy link
Contributor Author

我感觉是因为全局 token 生效的时机不对,只在生成默认值的时候会用到,一旦插入组件 token 重新计算样式时,全局 token 已经不再被读取了。

@zjianpeng
Copy link

还是有问题啊, 没人解决了吗

@wanpan11
Copy link
Contributor

这个挺复杂的 是初始动态计算出来的

@afc163
Copy link
Member

afc163 commented May 31, 2024

试着修复了一下 #48978 ,问题挺多,有点难搞。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants