Skip to content

Commit

Permalink
Merge pull request #10495 from ckeditor/ck/10383-add-system-colors
Browse files Browse the repository at this point in the history
Fix (engine): Adds System Colors names from CSS Color Module Level 3 so that pasting tables from MS Word works correctly. Closes #10383.
  • Loading branch information
niegowski authored Sep 10, 2021
2 parents 66a28ab + 7b1ecbb commit 8961911
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/ckeditor5-engine/src/view/styles/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ const COLOR_NAMES = new Set( [
'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon',
'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow',
'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen',
// CSS Color Module Level 3 (System Colors)
'activeborder', 'activecaption', 'appworkspace', 'background', 'buttonface', 'buttonhighlight', 'buttonshadow',
'buttontext', 'captiontext', 'graytext', 'highlight', 'highlighttext', 'inactiveborder', 'inactivecaption',
'inactivecaptiontext', 'infobackground', 'infotext', 'menu', 'menutext', 'scrollbar', 'threeddarkshadow',
'threedface', 'threedhighlight', 'threedlightshadow', 'threedshadow', 'window', 'windowframe', 'windowtext',
// CSS Color Module Level 4
'rebeccapurple',
// Keywords
Expand Down
2 changes: 2 additions & 0 deletions packages/ckeditor5-engine/tests/view/styles/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ describe( 'Styles utils', () => {
'orange',
// CSS Level 3
'cyan', 'azure', 'wheat',
// CSS Level 3 System Colors
'windowtext',
// CSS Level 4
'rebeccapurple'
], isColor );
Expand Down

0 comments on commit 8961911

Please sign in to comment.