Skip to content

Commit

Permalink
Fix typo, improve wording
Browse files Browse the repository at this point in the history
  • Loading branch information
abenhamdine authored and afc163 committed Sep 2, 2018
1 parent 8633bb4 commit c2e2f02
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/react/customize-theme.en-US.md
Expand Up @@ -100,8 +100,8 @@ Note: This way will load the styles of all components, regardless of your demand

## How to avoid modifying global styles ?

Currently ant-design modify is designed as a whole experience and modify global styles (eg `body` etc).
If you need to integrate ant-design as a part of an existing website, it's likely you would want to prevent ant-design to override global styles.
Currently ant-design is designed as a whole experience and modify global styles (eg `body` etc).
If you need to integrate ant-design as a part of an existing website, it's likely you want to prevent ant-design to override global styles.

While there's no canonical way to do it, you can take one of the following paths :

Expand All @@ -115,9 +115,7 @@ new webpack.NormalModuleReplacementPlugin( /node_modules\/antd\/lib\/style\/inde
#antd { @import '~antd/lib/style/core/index.less'; @import '~antd/lib/style/themes/default.less'; }
```

Where the src/myStylesReplacement.less file loads the same files as the index.less file, but loads them within the scope of a top-level selector:

The result is that all of the "global" styles are being applied with the #antd scope.
Where the src/myStylesReplacement.less file loads the same files as the index.less file, but loads them within the scope of a top-level selector : the result is that all of the "global" styles are being applied with the #antd scope.

### Use a postcss processor to scope all styles

Expand Down

0 comments on commit c2e2f02

Please sign in to comment.