• I actually sent this via email but I am not sure if you received it. There are font files (woff, woff2 and ttf) that are generated by plugins that are not required to load on every page and on every device (smartphone, desktop). Is it possible to add font files to scripts that can be unloaded?

    My second question is regarding screen and (max-width: 767px). I am trying to achieve the opposite, min-width so it will only appear on desktops and not smartphones. For some reason it is not working. Am I doing something wrong? I use screen and (min-width: 900px).

    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @dan14 there’s no unload feature for font files. Instead, if you unload a CSS file that is loading a certain font, obviously, that font won’t be loaded. Are you interested in a feature that will would the fonts you want? That would be an interesting one. So far, there’s one for removing all references to Google fonts.

    As for the rule to make the browser download a file only on desktops “screen and (min-width: 900px)” should work fine, really! The best way to test is to have the browser’s screen size already on mobile view (very small width) and while the browser’s console is opened. Then just resize it to at least 900px. That particular file should load then and appear in the console.

    PS: I can’t locate your email. Please share the website’s URL here. If you’re not comfortable with that use the following contact form – https://www.gabelivan.com/contact/ – to write to me and let me know here when you’ve done that so I’ll have the time when the actually sent it.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding font files to list and excluding scripts for smartphones only’ is closed to new replies.