Skip to content

Commit

Permalink
Fix rule media-feature-range-notation to use 'prefix' notation
Browse files Browse the repository at this point in the history
Media Queries Level 4 feature range syntax lacks both Autoprefixer and Internet Explorer support so we should override the rule default `'context'` to `'prefix'`

https://stylelint.io/user-guide/rules/media-feature-range-notation
https://www.w3.org/TR/mediaqueries-4/#mq-range-context
https://caniuse.com/css-media-range-syntax
  • Loading branch information
colinrotherham committed Nov 29, 2023
1 parent 17f4fd9 commit b4cdd33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
useful summary for people upgrading their application, not a replication
of the commit log.

## Unreleased

* [pull request #59: Fix rule `media-feature-range-notation` to use `'prefix'` notation](https://github.com/alphagov/stylelint-config-gds/pull/59)

## 1.1.0

This release includes:
Expand Down
5 changes: 5 additions & 0 deletions css-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ module.exports = {
// that tool across GDS products.
// https://stylelint.io/user-guide/rules/media-feature-name-no-vendor-prefix/
'media-feature-name-no-vendor-prefix': null,
// Require media query feature ranges to use prefix notation, this is
// required for Internet Explorer support which doesn't understand the
// modern syntax.
// https://stylelint.io/user-guide/rules/media-feature-range-notation/
'media-feature-range-notation': 'prefix',
// This rules attempts to prevent defining defining rules with a more
// specific selector than a previous one, where they may override. This
// is disables as it conflicts with our common usage of nesting rules
Expand Down

0 comments on commit b4cdd33

Please sign in to comment.