Skip to content

Commit

Permalink
fix: replaces material icons from node_modules with loacl icons
Browse files Browse the repository at this point in the history
Material design icons fonts are not updated on npm and github, so using local fonts downloaded from cdn.  ref: google/material-design-icons#786
  • Loading branch information
satyamyadav committed Jun 19, 2020
1 parent 0b579dd commit 409f68f
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 3 deletions.
4 changes: 2 additions & 2 deletions css/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const concat = require('gulp-concat');
const postcssColorMod = require('postcss-color-mod-function');
const cleaner = require('gulp-clean');

const materialIcons = '../node_modules/material-design-icons/iconfont/material-icons.css';
const materialFont = '../node_modules/material-design-icons/iconfont/MaterialIcons-Regular.{ttf,woff,woff2,eot}';
const materialIcons = './material-design-icons/iconfont/material-icons.css';
const materialFont = './material-design-icons/iconfont/MaterialIcons-Regular.{ttf,woff,woff2,eot}';

const sources = [
'./src/tokens/*.css',
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
36 changes: 36 additions & 0 deletions css/material-design-icons/iconfont/material-icons.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(MaterialIcons-Regular.eot); /* For IE6-8 */
src: local('Material Icons'),
local('MaterialIcons-Regular'),
url(MaterialIcons-Regular.woff2) format('woff2'),
url(MaterialIcons-Regular.woff) format('woff'),
url(MaterialIcons-Regular.ttf) format('truetype');
}

.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 16px; /* Preferred icon size */
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;

/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;

/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;

/* Support for IE. */
font-feature-settings: 'liga';
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
"axios": "^0.19.2",
"classnames": "^2.2.6",
"js-beautify": "^1.11.0",
"material-design-icons": "^3.0.1",
"react-dom": "^16.8.6",
"react-popper": "^1.3.7",
"recharts": "^1.8.5",
Expand Down

0 comments on commit 409f68f

Please sign in to comment.