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

Use swap as font-display to Google Fonts on Elementor #4

Open
edpittol opened this issue Feb 1, 2021 · 0 comments
Open

Use swap as font-display to Google Fonts on Elementor #4

edpittol opened this issue Feb 1, 2021 · 0 comments

Comments

@edpittol
Copy link
Member

edpittol commented Feb 1, 2021

Elementor uses the function the class Elementor\Frontend::enqueue_google_fonts to enqueue the Google Fonts used on the website. It doesn't consider to use the font-display: swap to display a system font while the webfont is loaded.

The challenge is develop an otimization inner Cwv_Perf_Optimize\Elementor namespace to load Google Fonts on Elementor with font-display: swap property.

How to reproduce

  1. Download Duplicator zip package and installer.php
  2. Clone the project
  3. Create the public directory on the root of the project
  4. Make public directory writable: chmod 777 public/
  5. Move the Duplicator zip package and installer.php to public directory
  6. Up the server: docker-compose up -d server
  7. Access Duplicator installer: https://localhost/installer.php
  8. Run the installation process. Use db as database password
  9. Access admin to finish the process. The credentials are admin / admin
  10. Access the homepage: https://localhost/
  11. Go to Network tab on Developer Tool and filter by swap
  12. The list of request is empty

Expected

The Google Fonts request should be shown on request list when filtered by swap.

Reference

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

No branches or pull requests

1 participant