Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit e8c80b5

Browse files
committed
Merge pull request #14 from jonathantneal/feature/nesting
Add PostCSS Nesting
2 parents a41b690 + 75ee17f commit e8c80b5

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"postcss-font-variant": "^2.0.0",
5151
"postcss-initial": "^1.3.1",
5252
"postcss-media-minmax": "^2.1.0",
53+
"postcss-nesting": "^2.0.5",
5354
"postcss-pseudo-class-any-link": "^1.0.0",
5455
"postcss-pseudoelements": "^3.0.0",
5556
"postcss-selector-matches": "^2.0.0",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.foo {
2+
color: red;
3+
4+
@nest & .bar {
5+
color: white;
6+
}
7+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.foo {
2+
color: red
3+
}
4+
.foo .bar {
5+
color: white
6+
}

src/features.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ export default {
66
calc(options) {
77
return require("postcss-calc")(options)
88
},
9+
nesting(options) {
10+
return require("postcss-nesting")(options)
11+
},
912
customMedia(options) {
1013
return require("postcss-custom-media")(options)
1114
},

0 commit comments

Comments
 (0)