New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-css-selector-limit

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-css-selector-limit

Gulp plugin that determines whether CSS files contain more selectors than IE's limit of 4095

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-css-selector-limit

Gulp plugin for detecting if any CSS file in a set has more selectors than IE's limit of 4095. Wraps the css-selector-limit module.

Getting Started

This plugin requires Gulp 3.9.x

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

npm install gulp-css-selector-limit --save-dev

The "css-selector-limit" task

Overview

In your project's gulpfile you can add the css-selector-limit task like so.

var gulp = require('gulp'),
	cssSelectorLimit = require('gulp-css-selector-limit');

gulp.task('css-selector-limit', function(){
	return gulp.src('style/**/*.css')
		.pipe(cssSelectorLimit())
		.pipe(cssSelectorLimit.reporter('default'))
		.pipe(cssSelectorLimit.reporter('fail'));
});

If you want the task to fail if a file is found that contains selectors that are over the limit then include the fail reporter as shown above.

Options

All options are the same as those defined in the css-selector-limit module.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.

Keywords

FAQs

Package last updated on 06 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc