Stylecow plugin to add support for CSS @custom-media
JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

stylecow plugin custom-selector

Build Status

Stylecow plugin to work with the @custom-selector at-rule, available in CSS Media Queries Level 4.

You write:

@custom-selector --heading h1, h2, h3, h4, h5, h6;
@custom-selector --main-world strong.main;
 
body --heading --main-world {
	color: blue;
}

And stylecow converts to:

body :matches(h1, h2, h3, h4, h5, h6) strong.main {
	color: blue;
}

More demos in the tests folder