Skip to content

media-feature-name-no-vendor-prefix

Reports a vendor-prefixed device-pixel-ratio media feature (-webkit-min-device-pixel-ratio).

The standard media feature is resolution, and the prefixed names are supported only by old engines. The standard one works in every current browser.

To fix, use min-resolution: 2dppx.

Reported
...
@media (-webkit-min-device-pixel-ratio: 2) {}
...
css:
lint:
rules:
media-feature-name-no-vendor-prefix:
level: warn # off (default), warn, error
options:
ignore: []
less:
lint:
rules:
media-feature-name-no-vendor-prefix:
level: warn # off (default), warn, error
options:
ignore: []
scss:
lint:
rules:
media-feature-name-no-vendor-prefix:
level: warn # off (default), warn, error
options:
ignore: []
Option Type Default Description
ignore list [] Names left out: names, or /regex/.

Enabled by the presets: css/stylelint-standard.

Suppress one line with sudsy-disable-next-line media-feature-name-no-vendor-prefix in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
stylelint media-feature-name-no-vendor-prefix full