1 | # property-no-vendor-prefix
|
2 |
|
3 | Disallow vendor prefixes for properties.
|
4 |
|
5 |
|
6 | ```css
|
7 | a { -webkit-transform: scale(1); }
|
8 | /** ↑
|
9 | * This prefix */
|
10 | ```
|
11 |
|
12 | This rule does not blanketly condemn vendor prefixes. Instead, it uses [Autoprefixer's](https://github.com/postcss/autoprefixer) up-to-date data (from [caniuse.com](http://caniuse.com/)) to know whether a vendor prefix should cause a violation or not. _If you've included a vendor prefixed property that has a standard alternative, one that Autoprefixer could take care of for you, this rule will complain about it_. If, however, you use a non-standard vendor-prefixed property, one that Autoprefixer would ignore and could not provide (such as `-webkit-touch-callout`), this rule will ignore it.
|
13 |
|
14 | The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.
|
15 |
|
16 | ## Options
|
17 |
|
18 | ### `true`
|
19 |
|
20 | The following patterns are considered violations:
|
21 |
|
22 |
|
23 | ```css
|
24 | a { -webkit-transform: scale(1); }
|
25 | ```
|
26 |
|
27 |
|
28 | ```css
|
29 | a { -moz-columns: 2; }
|
30 | ```
|
31 |
|
32 | The following patterns are _not_ considered violations:
|
33 |
|
34 |
|
35 | ```css
|
36 | a { transform: scale(1); }
|
37 | ```
|
38 |
|
39 |
|
40 | ```css
|
41 | a {
|
42 | columns: 2; }
|
43 | ```
|
44 |
|
45 |
|
46 | ```css
|
47 | a { -webkit-touch-callout: none; }
|
48 | ```
|
49 |
|
50 | ## Optional secondary options
|
51 |
|
52 | ### `ignoreProperties: ["/regex/", /regex/, "string"]`
|
53 |
|
54 | Given:
|
55 |
|
56 | ```
|
57 | ["transform", "columns"]
|
58 | ```
|
59 |
|
60 | The following patterns are _not_ considered violations:
|
61 |
|
62 |
|
63 | ```css
|
64 | a { -webkit-transform: scale(1); }
|
65 | ```
|
66 |
|
67 |
|
68 | ```css
|
69 | a { -moz-columns: 2; }
|
70 | ```
|