Skip to content

Commit b0ecd40

Browse files
committed
Docs.
1 parent 1fcab87 commit b0ecd40

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Awesome!
7777

7878
First you need to setup [webpack](http://webpack.github.io/docs/) to load your css files using "css" loader and enable CSS modules. You will also need to use `extract-text-webpack-plugin` to aggregate the CSS into a single file. Refer to [webpack-demo](https://github.com/css-modules/webpack-demo).
7979

80-
Then you need use the higher order component declaration pattern to "decorate" your component, e.g.
80+
Then you need to decorate your component using `CSSModules`, e.g.
8181

8282
```js
8383
import React from 'react';
@@ -100,7 +100,7 @@ Thats it!
100100

101101
## SASS, SCSS, LASS and other CSS Preprocessors
102102

103-
[ICSS](https://github.com/css-modules/icss) works with CSS Preprocessors. All you need is to add the preprocessor the chain of loaders, e.g. in the case of webpack it is as simple as install `sass-loader` and adding `!sass` to the end of the `style-loader` loader chain declaration (loaders are processed from right to left):
103+
[ICSS](https://github.com/css-modules/icss) is compatible with the CSS Preprocessors. All you need is to add the preprocessor to the chain of loaders, e.g. in the case of webpack it is as simple as installing `sass-loader` and adding `!sass` to the end of the `style-loader` loader chain declaration (loaders are processed from right to left):
104104

105105
```js
106106
{
@@ -111,7 +111,7 @@ Thats it!
111111

112112
## Multiple CSS Classes
113113

114-
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.
114+
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.
115115

116116
```css
117117
.button {
@@ -133,7 +133,7 @@ CSS modules promote composition pattern, i.e. every CSS class thats is used in a
133133

134134
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).
135135

136-
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.
136+
Using React CSS Modules, you can map as many CSS classes to the element as you want. `CSSModules` will append a unique class name for every class name it matches in the `className` declaration, e.g.
137137

138138
```css
139139
.button {
@@ -149,6 +149,6 @@ Using React CSS Modules, you can map as many CSS classes to the element as you w
149149
<div className='button active'></div>
150150
```
151151

152-
This will map both [ICSS](https://github.com/css-modules/icss) classes to the target element.
152+
This will map both [ICSS](https://github.com/css-modules/icss) CSS classes to the target element.
153153

154154
However, I encourage you to use composition whenever possible. Composition promotes better separation of markup from style sheets using semantics that would be hard to achieve without CSS modules. You can enforce one CSS class name per `className` using [`allowMultiple` option](#usage).

0 commit comments

Comments
 (0)