Skip to content

Commit b27bbcd

Browse files
committed
Docs.
1 parent dacf8b4 commit b27bbcd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Seamless mapping of class names to CSS modules inside of React components.
1212
- [`keepOriginal`](#keeporiginal)
1313
- [`errorNotFound`](#errornotfound)
1414
- [SASS, SCSS, LESS and other CSS Preprocessors](#sass-scss-less-and-other-css-preprocessors)
15+
- [Global CSS](#global-css)
1516
- [Multiple CSS Classes](#multiple-css-classes)
1617

1718
## What's the Problem?
@@ -163,6 +164,20 @@ Throws an error when class name cannot be mapped to a CSS Module. Default: `fals
163164
}
164165
```
165166

167+
## Global CSS
168+
169+
CSS Modules does not restrict you from using global CSS.
170+
171+
```css
172+
:global .foo {
173+
174+
}
175+
```
176+
177+
When using global CSS, you need to enable [`keepOriginal`](#keeporiginal) option.
178+
179+
Use global CSS with caution. With CSS Modules, there are only a handful of valid use cases for global CSS (e.g. [normalization](https://github.com/necolas/normalize.css/)).
180+
166181
## Multiple CSS Classes
167182

168183
CSS modules promote composition pattern, i.e. every CSS class that is used in a component should define all properties required to describe the element, e.g.

0 commit comments

Comments
 (0)