Browse Source

docs: Add FAQ about `@line-height-base` (#39565)

pull/39706/head
@linhf2023 2 years ago
committed by GitHub
parent
commit
c8f4225361
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      docs/react/faq.en-US.md
  2. 6
      docs/react/faq.zh-CN.md

6
docs/react/faq.en-US.md

@ -186,6 +186,12 @@ You should only access the API by official doc with ref. Directly access interna
For historical reasons, the display names of the pop components are not uniform, and both `open` and `visible` are used. This makes the memory cost that non-tsx users encounter when developing. It also leads to ambiguity about what name to choose when adding a feature. So we want to unify the attribute name, you can still use the original `visible` and it will still be backward compatible, but we will remove this attribute from the documentation as of v5.
## Setting the style variable '@line-height-base' caused a layout exception.
Because `@line-height-base` is involved in the layout calculation of some components, only `number` units are supported. If `20px` is passed, it will be interpreted as `20 ` for calculation, resulting in a layout exception.
Related issue: [#39451](https://github.com/ant-design/ant-design/issues/39451)
## How to spell Ant Design correctly?
- ✅ **Ant Design**: Capitalized with space, for the design language.

6
docs/react/faq.zh-CN.md

@ -206,6 +206,12 @@ ConfigProvider.config({
因为历史原因,弹层类组件展示命名并不统一,出现了 `open``visible` 都在使用的情况。这使得非 tsx 用户在开发时遭遇的记忆成本。同样导致新增 feature 时选择何种命名的模棱两可。因而我们希望统一该属性命名,你仍然可以使用原本的 `visible` 它仍然会向下兼容,但是从 v5 起我们将从文档中移除该属性。
## 设置了样式变量 `@line-height-base` 导致布局异常怎么办?
因为 `@line-height-base` 参与了部分组件的布局计算,所以只支持 `number` 类型的单位。如果传入了 `20px`,会被解析成 `20` 进行计算,导致布局异常。
相关 issue:[#39451](https://github.com/ant-design/ant-design/issues/39451)
## 如何正确的拼写 Ant Design?
- ✅ **Ant Design**:用空格分隔的首字母大写单词,指代设计语言。

Loading…
Cancel
Save