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

更语义化的 font-size CSS 变量 #6560

Open
guoyunhe opened this issue Mar 1, 2024 · 0 comments
Open

更语义化的 font-size CSS 变量 #6560

guoyunhe opened this issue Mar 1, 2024 · 0 comments
Labels

Comments

@guoyunhe
Copy link
Contributor

guoyunhe commented Mar 1, 2024

Version of antd-mobile

5.33.0

What is this feature about?

目前的 font-size 相关的 CSS 变量是这样的:

:root {
  --adm-font-size-1: 9px;
  --adm-font-size-2: 10px;
  --adm-font-size-3: 11px;
  --adm-font-size-4: 12px;
  --adm-font-size-5: 13px;
  --adm-font-size-6: 14px;
  --adm-font-size-7: 15px;
  --adm-font-size-8: 16px;
  --adm-font-size-9: 17px;
  --adm-font-size-10: 18px;
}
  1. 变种的数量有点多,这还是在移动端并没有考虑 h1-h6 的情况下
  2. 变量的命名缺乏语义,从字面上看不出来到底哪个变量是用在哪里
  3. 变量之间只有 1px 的差异,极不明显

希望能够适当减少变量的数量,并提供更加语义化的变量命名。

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

No branches or pull requests

1 participant