Skip to content

Commit

Permalink
Remove deprecated system colors, fixes #403
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart Veneman committed Jul 4, 2024
1 parent d55d859 commit 034708a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
43 changes: 13 additions & 30 deletions src/values/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,55 +159,38 @@ export const namedColors = new KeywordSet([
export const systemColors = new KeywordSet([
// CSS System Colors
// Spec: https://drafts.csswg.org/css-color/#css-system-colors
// TODO: Deprecated CSS System colors
// Spec: https://drafts.csswg.org/css-color/#deprecated-system-colors
'background',
'buttontext',
'highlight',
'windowtext',
'graytext',
'highlighttext',
'accentcolor',
'accentcolortext',
'activetext',
'buttonborder',
'buttonface',
'window',
'buttonshadow',
'buttonhighlight',
'menu',
'windowframe',
'activeborder',
'infotext',
'infobackground',
'activecaption',
'menutext',
'scrollbar',
'inactivecaption',
'appworkspace',
'inactiveborder',
'inactivecaptiontext',
'buttontext',
'canvas',
'canvastext',
'linktext',
'visitedtext',
'activetext',
'buttonborder',
'field',
'fieldtext',
'selecteditem',
'selecteditemtext',
'graytext',
'highlight',
'highlighttext',
'linktext',
'mark',
'marktext',
'selecteditem',
'selecteditemtext',
'visitedtext',
])

export const colorFunctions = new KeywordSet([
'rgba',
'rgb',
'hsla',
'hsl',
'oklch',
'color',
'hwb',
'lch',
'lab',
'oklab',
'oklch',
])

export const colorKeywords = new KeywordSet([
Expand Down
3 changes: 3 additions & 0 deletions src/values/colors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,9 @@ Colors('does not report false positives for color keywords', () => {
/* Not the black color keyword */
font-family: Arial Black, Arial Bold, Gadget, sans-serif;
font: 1em/1 Black;
/* not a color keyword */
-ms-overflow-style: scrollbar;
}
`).values.colors
const expected = {
Expand Down

0 comments on commit 034708a

Please sign in to comment.