peterbe/minimalcss

Exclude Google Fonts from minimizing

stereobooster opened this issue · 2 comments

Another finding: Google web fonts uses User Agent Sniffing, so Google fonts css should be left untouched.

Possible solutions:

  • keep logic as is, add this issue to the documentation
  • keep logic as is, but warn people about this issue
  • change logic to exclude Google Fonts css, and expose api to exclude other css, and return array of excluded css file

How to host fonts locally:

UPD: we have options.skippable

So basically, we need to advice users about this odd quirk. It'd be quite impure to write a default options.skippable function specifically for this. Then what if the user writes his own options.skippable and misses this hack?

By the way, thanks for pointing this out! My hack here is clearly wrong then. I need to invite back the <link> tag Google Fonts originally gave me. Sigh.

A big starting step forward is to mention it in the documentation at least.

Documentation is good enough. WIll close this