Skip to content

Commit d35454f

Browse files
committed
Docs.
1 parent 1e9f1d9 commit d35454f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Thats it!
100100

101101
## Multiple CSS Classes
102102

103-
CSS modules promote composition pattern, i.e. every CSS class should define all properties required to describe the element, e.g.
103+
CSS modules promote composition pattern, i.e. every CSS class thats is used in a component should define all properties required to describe the element, e.g.
104104

105105
```css
106106
.button {
@@ -122,7 +122,7 @@ CSS modules promote composition pattern, i.e. every CSS class should define all
122122

123123
To learn more about composing CSS rules, I suggest reading Glen Maddern article about [CSS Modules](http://glenmaddern.com/articles/css-modules) and the official [CSS modules spec](https://github.com/css-modules/css-modules).
124124

125-
However, using React CSS Modules, you can map as many CSS classes to the element as you want. `CSSModules` will append the unique class name for every class name it matches in the `className` declaration, e.g.
125+
Using React CSS Modules, you can map as many CSS classes to the element as you want. `CSSModules` will append the unique class name for every class name it matches in the `className` declaration, e.g.
126126

127127
```css
128128
.button {
@@ -138,4 +138,6 @@ However, using React CSS Modules, you can map as many CSS classes to the element
138138
<div className='button active'></div>
139139
```
140140

141-
This will work as you'd expect.
141+
This will map both [ICSS](https://github.com/css-modules/icss) classes to the target element.
142+
143+
However, I encourage you to use composing whenever possible. You can enforce one CSS class name per `className` using [`allowMultiple` option](#usage).

0 commit comments

Comments
 (0)