You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ Seamless mapping of class names to CSS modules inside of React components.
12
12
- [`keepOriginal`](#keeporiginal)
13
13
- [`errorNotFound`](#errornotfound)
14
14
-[SASS, SCSS, LESS and other CSS Preprocessors](#sass-scss-less-and-other-css-preprocessors)
15
+
-[Global CSS](#global-css)
15
16
-[Multiple CSS Classes](#multiple-css-classes)
16
17
17
18
## What's the Problem?
@@ -163,6 +164,20 @@ Throws an error when class name cannot be mapped to a CSS Module. Default: `fals
163
164
}
164
165
```
165
166
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
+
166
181
## Multiple CSS Classes
167
182
168
183
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