Skip to content

Commit 5c2afd9

Browse files
Merge branch 'cssinjs:master' into feat/exports-map-esm-node-interop
2 parents 52d3f6a + cf1f143 commit 5c2afd9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/jss-plugin-nested.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,28 @@ Compiles to:
143143
}
144144
```
145145

146+
## Increase specificity
147+
148+
When extending third party libraries with high secificity selector it's often necessary to also have a high specificity selector.
149+
150+
```javascript
151+
const styles = {
152+
button: {
153+
'.button &': {
154+
color: 'red'
155+
}
156+
}
157+
}
158+
```
159+
160+
Compiles to:
161+
162+
```css
163+
.button .button-0 {
164+
color: 'red';
165+
}
166+
```
167+
146168
### Demo
147169

148170
[CodeSandbox](//codesandbox.io/s/github/cssinjs/jss/tree/master/examples/plugins/jss-plugin-nested?fontsize=14)

0 commit comments

Comments
 (0)