Skip to content

Commit

Permalink
Turn on media-feature-name-no-unknown stylelint rule
Browse files Browse the repository at this point in the history
This rule doesn't allow media features that aren't defined in CSS
specifications (while making an exception for vendor prefixed ones).

min-device-pixel-ratio never became an actual standard and the
min-resolution rule is preferred. min--moz-device-pixel-ratio was a
Mozilla specific rule that was dropped after Firefox 16 which is quite
far out of the browser support range this project has.

Orginates from: https://github.com/stylelint/stylelint-config-recommended/blob/59523c88fb1d83d922a3982c2ccf3c3c3b2776b3/index.js#L22
  • Loading branch information
kevindew committed Sep 1, 2020
1 parent 1d8bc76 commit 448f78e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion .stylelintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ignoreFiles: src/govuk/vendor/**/*
rules:
declaration-no-important: ~
indentation: ~
media-feature-name-no-unknown: ~
media-feature-parentheses-space-inside: ~
no-duplicate-selectors: ~
no-eol-whitespace: ~
Expand Down
2 changes: 0 additions & 2 deletions src/govuk/helpers/_device-pixels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@

@mixin govuk-device-pixel-ratio($ratio: 2) {
@media only screen and (-webkit-min-device-pixel-ratio: $ratio),
only screen and (min--moz-device-pixel-ratio: $ratio),
only screen and ( -o-min-device-pixel-ratio: #{($ratio*10)} / 10),
only screen and ( min-device-pixel-ratio: $ratio),
only screen and ( min-resolution: #{($ratio*96)}dpi),
only screen and ( min-resolution: #{$ratio}dppx) {
@content;
Expand Down

0 comments on commit 448f78e

Please sign in to comment.