Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-6080

Campaign stylesheets call fonts.googleapis.com from a stylesheet and don't use swap

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Merged
    • Icon: Should have Should have
    • 2.54.0
    • None
    • 3
    • Campaigns, Technical Debt
    • Sprint #159
    • leda

      The fonts used on the whole site are loaded with a <link rel=stylesheet> in the HTML head, while campaigns load them with an import statement in the CSS file.

      Google fonts added in the HTML are optimized by Cloudflare APO, i.e. Cloudflare does the first request and includes the response directly in a <style> tag in the HTML.

      Additionally campaigns include all the fonts that can be chosen in the campaign options, so it needs to request all these files, even if the fonts are not used. If these are optimized there will be 5 blocking requests less during CSS parsing.

      We should also add a "swap" property like our base fonts, so that the browser will fallback to a generic font if it needs to wait loading the font file, like our base CSS fonts.

            pvincent Pieter Vincent
            pvincent Pieter Vincent
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: