Stylecow plugin to add support for nested rules.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests fixed nested selectors when the & is not a direct child Oct 9, 2015
.gitignore changes for stylecow-parser 2.0 Apr 18, 2015
.travis.yml updated for stylecow-core v2 Sep 10, 2015
LICENSE added travis Jun 10, 2015
README.md added travis Jun 10, 2015
index.js fixed nested selectors when the & is not a direct child Oct 9, 2015
package.json updated dependencies Oct 9, 2015

README.md

stylecow plugin nested-rules

Build Status

Stylecow plugin to add support for nested rules.

More info:

You write:

body {
	p {
		color: blue;
	}
	> section {
		h1, h2 {
			color: red;

			&.green {
				color: green;
			}
		}
	}
	div, span {
		a {
			color: orange;
		}
	}
}

And stylecow converts to:

body p {
	color: blue;
}
body>section h1, body>section h2 {
	color: red;
}
body>section h1 .green, body>section h2.green {
	color: green;
}
body div a, body span a {
	color: orange;
}

More demos in the tests folder