Stylecow plugin to add support for CSS @custom-media
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-media

Build Status

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

You write:

@custom-media --small-viewport (max-width: 30em);
 
@media (--small-viewport) {
	body {
		color: blue;
	}
}

And stylecow converts to:

@media (max-width: 30em) {
	body {
		color: blue;
	}
}

More demos in the tests folder