ant-design / ant-design/pro-components

ProLayout的Sider Token没有字体大小设置,使用全局的ConfigProvidert又不生效, 难道没人觉得左侧菜单栏的字体14px太小了吗

Open
#8,455 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🧐 ProLayout的Sider Token没有字体大小设置, 使用全局的ConfigProvidert又不生效

### 💻 示例代码

```typescript
// app.tsx. 无法生效
ConfigProvider.config({
theme: {
token: {
fontSize: 20,
fontSizeSM: 24,
fontSizeLG: 24,
fontSizeXL: 26
},
components: {
Menu: {
fontSize: 22,
groupTitleFontSize: 20,
groupTitleColor: "blue",
fontSizeSM: 24,
fontSizeLG: 24,
fontSizeXL: 26,
groupTitleFontSize: 22
},
}
}
})
```

### 🚑 其他信息
当前antd pro 的版本为: [antd@5.17.3]

### 贴图
![image](https://github.com/ant-design/pro-components/assets/11640428/302c5165-f6d8-4af4-90a2-fb082ca045d8)
![image](https://github.com/ant-design/pro-components/assets/11640428/29f9a438-c20a-46e7-94a2-c87b74e4623a)
![image](https://github.com/ant-design/pro-components/assets/11640428/0cd43487-d785-40b8-b22c-fe21233d56b6)

### 致谢
首先致谢Antd社区工作组的贡献者们, 再次感谢本次能为我提供帮助的先生们[致敬]

Contributor guide

Open the contributing guide

Research direction

Start with the ProLayout Sider and its menu rendering path, then reproduce the issue from app.tsx using antd 5.17.3 and the shown ConfigProvider theme. Compare the Sider token behavior with the renderMenu workaround; done means the intended menu font-size configuration works consistently without losing local styles.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.