Skip to content

Commit

Permalink
Add forced-colors support for media-feature-name-* rules
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed May 15, 2020
1 parent cca7d52 commit 1737dbf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/reference/keywordSets.js
Expand Up @@ -527,8 +527,8 @@ keywordSets.pageMarginAtRules = new Set([

// https://developer.mozilla.org/en/docs/Web/CSS/At-rule
keywordSets.atRules = uniteSets(keywordSets.pageMarginAtRules, [
'apply',
'annotation',
'apply',
'character-variant',
'charset',
'counter-style',
Expand Down Expand Up @@ -569,24 +569,25 @@ keywordSets.mediaFeatureNames = uniteSets(keywordSets.deprecatedMediaFeatureName
'any-hover',
'any-pointer',
'aspect-ratio',
'color',
'color-gamut',
'color-index',
'color',
'forced-colors',
'grid',
'height',
'hover',
'inverted-colors',
'light-level',
'max-aspect-ratio',
'max-color',
'max-color-index',
'max-color',
'max-height',
'max-monochrome',
'max-resolution',
'max-width',
'min-aspect-ratio',
'min-color',
'min-color-index',
'min-color',
'min-height',
'min-monochrome',
'min-resolution',
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/media-feature-name-no-unknown/__tests__/index.js
Expand Up @@ -44,6 +44,9 @@ testRule({
code: '@media (--viewport-medium) { }',
description: 'ignore css variables',
},
{
code: '@media (forced-colors: active) { }',
},
],

reject: [
Expand Down

0 comments on commit 1737dbf

Please sign in to comment.