Skip to content

Commit 2b582ad

Browse files
committed
updated README.md
1 parent 68cb9e5 commit 2b582ad

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ It's useful when you, for instance, need to post process the CSS as a string.
104104
|**`camelCase`**|`{Boolean\|String}`|`false`|Export Classnames in CamelCase|
105105
|**`importLoaders`**|`{Number}`|`0`|Number of loaders applied before CSS loader|
106106
|**`localIdentName`**|`{String}`|`[hash:base64]`|Configure the generated ident|
107+
|**`increaseSpecificity`**|`{Object}`|`{}`|Enable/Disable and configure the postcss-increase-specificity plugin|
107108

108109
### `root`
109110

@@ -430,6 +431,31 @@ The query parameter `importLoaders` allows to configure how many loaders before
430431

431432
This may change in the future, when the module system (i. e. webpack) supports loader matching by origin.
432433

434+
### `increaseSpecificity`
435+
436+
The query parameter `increaseSpecificity` allows to enable and configure postcss-increase-specificity plugin. See [postcss-increase-specificity's documentation](https://github.com/MadLittleMods/postcss-increase-specificity/blob/master/README.md) for more information on the available options.
437+
438+
**webpack.config.js**
439+
```js
440+
{
441+
test: /\.s?css$/,
442+
use: [
443+
'style-loader',
444+
{
445+
loader: 'css-loader',
446+
options: {
447+
increaseSpecificity: {
448+
stackableRoot: '.my-root', // string - Selector that is repeated to make up the piece that is added to increase specificity
449+
repeat: 1, // number - The number of times we prepend options.stackableRoot in front of your selector
450+
},
451+
}
452+
},
453+
'postcss-loader',
454+
'sass-loader'
455+
]
456+
}
457+
```
458+
433459
<h2 align="center">Examples</h2>
434460

435461
### Assets

0 commit comments

Comments
 (0)