mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
docs: update FQA (#44902)
* docs: update FQA [skip ci] * test(theme): supplement unit test case * chore: update docs
This commit is contained in:
@@ -289,6 +289,8 @@ describe('Theme', () => {
|
||||
expect(token2.colorLink).toEqual(token2.colorInfo);
|
||||
expect(token2.colorLinkHover).toEqual(token2.colorInfoHover);
|
||||
expect(token2.colorLinkActive).toEqual(token2.colorInfoActive);
|
||||
// colorInfo should not follow colorPrimary
|
||||
expect(token2.colorLink).not.toEqual('#189cff');
|
||||
|
||||
const token3 = getHookToken({ algorithm: [theme.darkAlgorithm] });
|
||||
expect(token3.colorLink).toEqual(token3.colorInfo);
|
||||
|
||||
@@ -211,6 +211,10 @@ Please ref document [Shadow Dom Usage](/docs/react/customize-theme#shadow-dom-us
|
||||
|
||||
Please ref dynamic theme document [SSR](/docs/react/customize-theme#server-side-render-ssr) part.
|
||||
|
||||
## What is the relationship between colorPrimary and colorInfo and colorLink in V5?
|
||||
|
||||
In the Ant Design Token system, `colorPrimary` and `colorInfo` are both [Seed Token](../react/customize-theme.en-US.md#seed-token), so they are independent of each other. `colorLink` is an [Alias Token](../react/customize-theme.en-US.md#alias-token), inherits `colorInfo` by default, and is independent of `colorPrimary`.
|
||||
|
||||
## How to spell Ant Design correctly?
|
||||
|
||||
- ✅ **Ant Design**: Capitalized with space, for the design language.
|
||||
|
||||
@@ -239,6 +239,10 @@ import { ConfigProvider } from 'antd';
|
||||
|
||||
请参考动态主题文档 [服务端渲染](/docs/react/customize-theme-cn#服务端渲染) 部分内容。
|
||||
|
||||
## V5 中 colorPrimary 和 colorInfo 及 colorLink 之间是什么关系?
|
||||
|
||||
在 Ant Design Token 系统中 `colorPrimary` 和 `colorInfo` 同属于 [基础变量(Seed Token)](../react/customize-theme.zh-CN.md#基础变量seed-token),所以两者是互相独立的。`colorLink` 则属于 [别名变量(Alias Token)](../react/customize-theme.zh-CN.md#别名变量alias-token), 默认继承 `colorInfo` 且和 `colorPrimary` 无关。
|
||||
|
||||
## 如何正确的拼写 Ant Design?
|
||||
|
||||
- ✅ **Ant Design**:用空格分隔的首字母大写单词,指代设计语言。
|
||||
|
||||
Reference in New Issue
Block a user