Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update styling READMEs CSS modules info #30334

Merged
merged 4 commits into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/gatsby-plugin-less/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ plugins: [
]
```

If you need to override the default options passed into [`css-loader`](https://github.com/webpack-contrib/css-loader/tree/version-1)
**Note:** Gatsby is using `css-loader@1.0.1`.
If you need to override the default options passed into [`css-loader`](https://github.com/webpack-contrib/css-loader)
**Note:** Gatsby is using `css-loader@^5.0.0`.

```javascript
// in gatsby-config.js
Expand All @@ -56,8 +56,8 @@ plugins: [

### With CSS Modules

Using CSS modules requires no additional configuration. Simply prepend `.module` to the extension. For example: `App.less` -> `App.module.less`.
Any file with the `module` extension will use CSS modules.
Using CSS modules requires no additional configuration. Simply prepend `.module` to the extension. For example: `app.less` -> `app.module.less`.
Any file with the `module` extension will use CSS modules. CSS modules are imported as ES Modules to support treeshaking. You'll need to import styles as: `import { yourClassName, anotherClassName } from './app.module.less'`.

### PostCSS plugins

Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-postcss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ If you need to pass options to PostCSS use the plugins options; see [`postcss-lo

### With CSS Modules

Using CSS modules requires no additional configuration. Simply prepend `.module` to the extension. For example: `App.css` -> `App.module.css`.
Any file with the `module` extension will use CSS modules.
Using CSS modules requires no additional configuration. Simply prepend `.module` to the extension. For example: `app.css` -> `app.module.css`.
Any file with the `module` extension will use CSS modules. CSS modules are imported as ES Modules to support treeshaking. You'll need to import styles as: `import { yourClassName, anotherClassName } from './app.module.css'`

### PostCSS plugins

Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-sass/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ plugins: [

### With CSS Modules

Using CSS Modules requires no additional configuration. Simply prepend `.module` to the extension. For example: `App.scss` -> `App.module.scss`.
Any file with the `module` extension will use CSS Modules.
Using CSS Modules requires no additional configuration. Simply prepend `.module` to the extension. For example: `app.scss` -> `app.module.scss`.
Any file with the `module` extension will use CSS Modules. CSS modules are imported as ES Modules to support treeshaking. You'll need to import styles as: `import { yourClassName, anotherClassName } from './app.module.scss'`

## Sass & CSS Modules file Regexes

Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-stylus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ plugins: [`gatsby-plugin-stylus`]

### With CSS Modules

Using CSS modules requires no additional configuration. Simply prepend `.module` to the extension. For example: `App.styl` -> `App.module.styl`.
Any file with the `module` extension will use CSS modules.
Using CSS modules requires no additional configuration. Simply prepend `.module` to the extension. For example: `app.styl` -> `app.module.styl`.
Any file with the `module` extension will use CSS modules. CSS modules are imported as ES Modules to support treeshaking. You'll need to import styles as: `import { yourClassName, anotherClassName } from './app.module.styl'`

### With Stylus plugins

Expand Down