Skip to content

Remove Roboto font import #104

Closed
Closed
@DimitryDushkin

Description

@DimitryDushkin

Hey! Great project!

Just want to mention, that it's not good for performance to load font via @import in CSS. So it will be good to exclude this line — https://github.com/callemall/material-ui/blob/master/src/less/variables/custom-variables.less#L5
and add loading via webfont, like this:

  WebFontConfig = {
    google: { families: [ 'Roboto:400,500:latin,cyrillic' ] }
  };
  (function() {
    var wf = document.createElement('script');
    wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
    '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
    wf.type = 'text/javascript';
    wf.async = 'true';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);
  })();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions