Skip to content

Commit

Permalink
Fix icons and color palette in IE
Browse files Browse the repository at this point in the history
  • Loading branch information
samclarke committed Nov 6, 2017
1 parent 52d4559 commit 311058c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
7 changes: 7 additions & 0 deletions src/icons/material.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@
if (!isSourceMode && currentNode) {
color = currentNode.ownerDocument
.queryCommandValue('forecolor');

// Needed for IE
if (parseInt(color) === color) {
// eslint-disable-next-line
color = ((color & 0x0000ff) << 16) | (color & 0x00ff00) | ((color & 0xff0000) >>> 16);
color = '#' + ('000000' + color.toString(16)).slice(-6);
}
}

dom.css(colorPath, 'fill', color);
Expand Down
7 changes: 7 additions & 0 deletions src/icons/monocons.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions src/lib/defaultOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ export default {
*
* @type {string}
*/
colors: '#000,#44B8FF,#1E92F7,#0074D9,#005DC2,#00369B,#b3d5f4|' +
'#444,#C3FFFF,#9DF9FF,#7FDBFF,#68C4E8,#419DC1,#d9f4ff|' +
'#666,#72FF84,#4CEA5E,#2ECC40,#17B529,#008E02,#c0f0c6|' +
'#888,#FFFF44,#FFFA1E,#FFDC00,#E8C500,#C19E00,#fff5b3|' +
'#aaa,#FFC95F,#FFA339,#FF851B,#E86E04,#C14700,#ffdbbb|' +
'#ccc,#FF857A,#FF5F54,#FF4136,#E82A1F,#C10300,#ffc6c3|' +
'#eee,#FF56FF,#FF30DC,#F012BE,#D900A7,#B20080,#fbb8ec|' +
'#fff,#F551FF,#CF2BE7,#B10DC9,#9A00B2,#9A00B2,#e8b6ef',
colors: '#000000,#44B8FF,#1E92F7,#0074D9,#005DC2,#00369B,#b3d5f4|' +
'#444444,#C3FFFF,#9DF9FF,#7FDBFF,#68C4E8,#419DC1,#d9f4ff|' +
'#666666,#72FF84,#4CEA5E,#2ECC40,#17B529,#008E02,#c0f0c6|' +
'#888888,#FFFF44,#FFFA1E,#FFDC00,#E8C500,#C19E00,#fff5b3|' +
'#aaaaaa,#FFC95F,#FFA339,#FF851B,#E86E04,#C14700,#ffdbbb|' +
'#cccccc,#FF857A,#FF5F54,#FF4136,#E82A1F,#C10300,#ffc6c3|' +
'#eeeeee,#FF56FF,#FF30DC,#F012BE,#D900A7,#B20080,#fbb8ec|' +
'#ffffff,#F551FF,#CF2BE7,#B10DC9,#9A00B2,#9A00B2,#e8b6ef',

/**
* The locale to use.
Expand Down

0 comments on commit 311058c

Please sign in to comment.