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

chore: experiment with not including font @import in CSS, but rather via <link> in HTML #69

Merged
merged 1 commit into from
Jul 22, 2023

Conversation

adamstankiewicz
Copy link
Member

@adamstankiewicz adamstankiewicz commented Jul 22, 2023

When core.css or core.min.css loads in the browser, the stylesheet's loading gets render-blocked by a CSS @import for the Inter Google Font:

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Roboto+Mono&display=swap');

This @import means that users must first download the core.min.css, parse it, and then perform the dynamic @import for the Inter font:

image

This PR releases a version of alpha that does not include the dynamic @import to rely instead of a <link rel="preload" as="font"> instead to see any performance differences in render-blocking content.

@adamstankiewicz adamstankiewicz merged commit 4de2486 into alpha Jul 22, 2023
@adamstankiewicz adamstankiewicz deleted the ags/brand-font-preload branch July 22, 2023 12:30
@edx-semantic-release
Copy link
Collaborator

🎉 This PR is included in version 2.2.0-alpha.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants