Skip to content

Identify the selectors, which can be grouped as they have same set of properties and values.

Notifications You must be signed in to change notification settings

ssivanatarajan/stylelint-group-selectors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

stylelint-group-selectors

Identify the selectors, which can be grouped, as they have same set of properties and values.

  .a{ display: inline-block;width: 100px;}
  .b{display:inline-block;width:100px;}

Above selectors can be grouped like this

.a,.b{display:inline-block;width: 100px;}

Installation

npm install stylelint-group-selectors --save-dev

Usage

// .stylelintrc
{
  "plugins": [
    "stylelint-group-selectors"
  ],
  "rules": {
    "plugin/stylelint-group-selectors": true,
  }
}

Options

true

The following patterns are considered violations:

.b{display:inline-block;color:#111;}
.a{display:inline-block;color:#111;}
.a,.b{display: inline-block;color:#111; }

About

Identify the selectors, which can be grouped as they have same set of properties and values.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published