docs: update layer docs (#55818)

* docs: update docs

* update
This commit is contained in:
lijianan
2025-11-22 23:20:35 +08:00
committed by GitHub
parent c2e000f89d
commit 8c9368c9f2
3 changed files with 5 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ Use this section to tell people about which versions of your project are current
| Version | Supported |
| ------- | ------------------ |
| 6.x | :white_check_mark: |
| 5.x | :white_check_mark: |
| < 5.0 | :x: |

View File

@@ -296,9 +296,9 @@ In global.css, adjust `@layer` to control the order of style override. Place `an
@import 'tailwindcss';
```
### reset.css
### reset.css and antd.css
If you are using Ant Designs `reset.css`, you need to assign it to a specific `@layer` to prevent it from overriding the lowered-specificity antd styles. Likewise, in the `zeroRuntime` scenario, if you import `antd.css` separately, you must also place it inside `layer(antd)` to keep the layer hierarchy consistent:
If you are using Ant Designs `reset.css`, you need to assign it to a specific `@layer` to prevent it from overriding the lowered-specificity antd styles. Similarly, in the `zeroRuntime` scenario, if you import `antd.css` separately, you must also place it inside `layer(antd)` to keep the layer hierarchy consistent:
```css
/* Both reset.css and antd.css must specify a layer */

View File

@@ -296,9 +296,9 @@ export default () => (
@import 'tailwindcss';
```
### reset.css
### reset.css 和 antd.css
如果你使用了 antd 的 `reset.css` 样式,你需要为其指定 `@layer` 以防止将 antd 降权的样式覆盖同理,在 `zeroRuntime` 场景下如果你单独引入 `antd.css`,也必须为其添加 `layer(antd)` 以保持层级一致:
如果你使用了 antd 的 `reset.css` 样式,你需要为其指定 `@layer` 以防止将 antd 降权的样式覆盖同理,在 `zeroRuntime` 场景下如果你单独引入 `antd.css`,也必须为其添加 `layer(antd)` 以保持层级一致:
```css
/* reset.css 和 antd.css 都需要指定 layer */