sasstools / sass-lint

Pure Node.js Sass linting
MIT License
1.77k stars 532 forks source link

Not possible to igonre -webkit-tap-highlight-color property for no-vendor-prefixes rule #1188

Open skripnike opened 6 years ago

skripnike commented 6 years ago

gulp-sass-lint: 1.3.4

.sass-lint.yml:

no-vendor-prefixes: 1
    - ignore-non-standard: true
    - excluded-identifiers: ['-webkit-tap-highlight-color']

I want to ignore -webkit-tap-highlight-color property for no-vendor-prefixes rule

https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-vendor-prefixes.md#ignore-non-standard herer exist article how to Ignore Non Standard, but not working because tap-highlight-color exist in default property list https://github.com/sasstools/sass-lint/blob/master/data/properties.yml

excluded-identifiers: ['-webkit-tap-highlight-color'] do not work aswell possible only ignore all webkit properies:

no-vendor-prefixes: 1
    - excluded-identifiers: ['webkit']

only helped to remove tap-highlight-color from /node_modules/ssas-lint/data/properties.yml and use ignore-non-standard: true

Does exist anly possible way to ignore specified property? -webkit-tap-highlight-color for example.

coreyward commented 6 years ago

I'm similarly experiencing that the ignore-non-standard option on the no-vendor-prefixes rule doesn't behave as described in the docs:

# .sass-lint.yml
options:
  formatter: stylish
files:
  include: '**/*.s+(a|c)ss'
rules:
  no-vendor-prefixes:
    - 1
    -
      ignore-non-standard: true
$black: #111;
body {
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: $black;
}

Running sass-lint spits out the following:

   3:3   warning  Vendor prefixes should not be used                                             no-vendor-prefixes
   4:3   warning  Vendor prefixes should not be used                                             no-vendor-prefixes
timmkd commented 5 years ago

I am experiencing the same issue.

webermaximilian92 commented 5 years ago

"ignore-non-standard is an option that allows you to specify whether only standard properties from our properties list should be affected..." https://github.com/sasstools/sass-lint/blob/master/docs/rules/no-vendor-prefixes.md

They are using this properties-list which includes: font-smoothing and tap-highlight-color altough they are non-standard according to the MDN web docs List: https://github.com/sasstools/sass-lint/blob/master/data/properties.yml non-standard https://developer.mozilla.org/de/docs/Web/CSS/-webkit-tap-highlight-color non-standard https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth

I don't get it.