Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: default to font-display: swap unless preloading #88

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

kara
Copy link
Contributor

@kara kara commented Jun 9, 2022

This commit sets the font-display default to 'swap',
unless the preload option is set to true. Either way,
the font-display value is still user-overridable using
the display option.

We generally recommend using 'swap' because it's the
best way to avoid FOIT (flash of invisible text) and
optimize LCP while still guaranteeing the web font
will load (unlike optonal).

@codecov
Copy link

codecov bot commented Jun 9, 2022

Codecov Report

Merging #88 (fa4d4e0) into master (fa4d4e0) will not change coverage.
The diff coverage is n/a.

❗ Current head fa4d4e0 differs from pull request most recent head 37358de. Consider uploading reports for the commit 37358de to get more accurate results

@@            Coverage Diff            @@
##            master       #88   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           43        43           
  Branches        13        13           
=========================================
  Hits            43        43           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa4d4e0...37358de. Read the comment docs.

This commit sets the font-display default to 'swap',
unless the preload option is set to true. Either way,
the font-display value is still user-overridable using
the display option.

We generally recommend using 'swap' because it's the
best way to avoid FOIT (flash of invisible text) and
optimize LCP while still guaranteeing the web font
will load (unlike optonal).
@ricardogobbosouza ricardogobbosouza merged commit 1e50410 into nuxt-modules:master Jun 9, 2022
@ricardogobbosouza
Copy link
Collaborator

Thanks @kara

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants