Warn if CSS file has more than equal 4096 selectors.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Warn if CSS file has more than equal 4096 selectors.

Getting Started

This plugin requires Grunt ~0.4.2

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-selector4096 --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


The "selector4096" task

Run this task with the grunt selector4096 command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Usage examples

In this example, running grunt selector4096:all (or grunt selector4096 because selector4096 is a multi task) will count selectors in all CSS files under the src/css/ directory and their subdirectories, warn if they have more than eqall 4096 selectors, and abort.

  selector4096: {
    all: ['src/css/**/*.css']

This plugin is read-only task, so you don't need to specify dest like grunt-contrib-jshint.


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • 2013-12-14 v0.1.0 Initial release