mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-08 18:39:20 +08:00
@@ -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: |
|
||||
|
||||
|
||||
@@ -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 Design’s `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 Design’s `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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user