Skip to content

Rework plugin to check if CSS contains more selectors than allowed by IE < 10's selector limit

License

Notifications You must be signed in to change notification settings

reworkcss/rework-ie-limits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rework-ie-limits

Build Status

A Rework plugin that tests whether a chunk of CSS exceeds IE < 10's limit of 4095 selectors.

Installation

Install with npm:

npm install rework-ie-limits

Use

As a Rework plugin:

var rework = require('rework');
var ieLimits = require('rework-ie-limits');

var css = rework(cssinput).use(ieLimits);

It will throw an Error if the limit has been exceeded.

Note that the plugin is extremely conservative. It will assume that ALL selectors (and those within any media query) are supported and applied by each version of IE < 10. Therefore, there will be some false positives as you approach the limit.

Testing

For CI:

npm test

For development:

npm run watch

About

Rework plugin to check if CSS contains more selectors than allowed by IE < 10's selector limit

Resources

License

Stars

Watchers

Forks

Packages

No packages published