Skip to content

Latest commit

 

History

History
97 lines (72 loc) · 1.44 KB

no-vendor-prefixes.md

File metadata and controls

97 lines (72 loc) · 1.44 KB

No Vendor Prefixes

Rule no-vendor-prefixes will enforce that vendor prefixes are not allowed to be used.

List of prefixes affected by default:

  • webkit
  • moz
  • ms

Options

  • additional-identifiers: [array of additional prefixes to check for] (defaults to empty array [])
  • excluded-identifiers: [array of prefixes to exclude checking for] (defaults to empty array [])

Examples

When enabled, the following are disallowed:

@-webkit-keyframes anim {
  0% { opacity: 0; }
}

.ms-block {
  -ms-hyphenate-limit-lines: no-limit;
}

::-moz-placeholder {
  content: '';
}

.foo {
  -webkit-transition: none;
}

.bar {
  position: -moz-sticky;
}

When additional-identifiers contains a custom prefix value of test as show below

no-vendor-prefix:
  - 1
  -
    'additional-identifiers':
      - 'khtml'

The following would now also be disallowed

.baz {
  position: -khtml-sticky;
}

When excluded-identifiers contains currently disallowed prefix values such as webkit and moz as show below

no-vendor-prefix:
  - 1
  -
    'excluded-identifiers':
      - 'webkit'
      - 'moz'

The following would now be allowed

@-webkit-keyframes anim {
  0% { opacity: 0; }
}

::-moz-placeholder {
  content: '';
}

.foo {
  -webkit-transition: none;
}

.bar {
  position: -moz-sticky;
}

While the following would remain disallowed

.ms-block {
  -ms-hyphenate-limit-lines: no-limit;
}