Sha256: 842d1973ab1b5304f1e5aeda7d536ff7101e7287c050e5e72df76dfee5145b9a

Contents?: true

Size: 1.5 KB

Versions: 24

Compression:

Stored size: 1.5 KB

Contents

# selector-no-qualifying-type

Disallow qualifying a selector by type.

<!-- prettier-ignore -->
```css
    a.foo {}
/** ↑
 * This type selector is qualifying the class */
```

A type selector is "qualifying" when it is compounded with (chained to) another selector (e.g. `a.foo`, `a#foo`). This rule does not regulate type selectors that are combined with other selectors via a combinator (e.g. `a > .foo`, `a #foo`).

## Options

### `true`

The following patterns are considered violations:

<!-- prettier-ignore -->
```css
a.foo {
  margin: 0
}
```

<!-- prettier-ignore -->
```css
a#foo {
  margin: 0
}
```

<!-- prettier-ignore -->
```css
input[type='button'] {
  margin: 0
}
```

The following patterns are _not_ considered violations:

<!-- prettier-ignore -->
```css
.foo {
  margin: 0
}
```

<!-- prettier-ignore -->
```css
#foo {
  margin: 0
}
```

<!-- prettier-ignore -->
```css
input {
  margin: 0
}
```

## Optional secondary options

### `ignore: ["attribute", "class", "id"]`

#### `"attribute"`

Allow attribute selectors qualified by type.

The following patterns are _not_ considered violations:

<!-- prettier-ignore -->
```css
input[type='button'] {
  margin: 0
}
```

#### `"class"`

Allow class selectors qualified by type.

The following patterns are _not_ considered violations:

<!-- prettier-ignore -->
```css
a.foo {
  margin: 0
}
```

#### `"id"`

Allow ID selectors qualified by type.

The following patterns are _not_ considered violations:

<!-- prettier-ignore -->
```css
a#foo {
  margin: 0
}
```

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-5.0.7 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-5.0.6 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-5.0.5 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-5.0.4 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-5.0.3 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-5.0.2 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-5.0.1 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-4.3.5 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-5.0.0 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-4.3.4 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-4.3.3 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-4.3.2 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-4.3.1 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-4.3 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-4.2.3 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-4.2.2 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-4.2.1 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-4.2 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md
trusty-cms-4.1.9 node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md