Skip to content

A project to fix the IE8 and other versions CSS selector limit on CSS files.

License

Notifications You must be signed in to change notification settings

aasierra/Motley-CSS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Motley CSS - Current version is 1.0.4

A tool for splitting CSS files to fix the Internet Explorer selector limit of 4096 bug.

Getting started

In order to use motley you will need to require it and then it will return the motley function that you can call.

var motley = require('motley'); motley({ fileName:'nameOfHugeCssFile.css', diagnostics:false, callback:function () {}, limit:4095 });

fileName (required)

The file name is the name of the file that has the large amount of css inside of it. Motley will override it with the css that fits within IE's limits and then add imports to that file and create the rest of the files labeled fileName1, fileName2, etc as many files as are needed to stay under the specified limit or the IE limit.

diagnostics (optional)

When set to true, diagnostic information will be printed when ran to keep track of things and see selector and comment count. The default value is false.

callback (optional)

As this is an asynchronous operation the callback is for you to know when Motley is finished. By default this is undefined.

limit (optional)

The library is for the IE limit of 4096 however if you would like the limit to be smaller or larger for performance testing that is allowed.

Contributing

Create an issue and a PR and I will look into it.

License

MIT license found in the LICENSE file above.

About

A project to fix the IE8 and other versions CSS selector limit on CSS files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published