Fonts: Hard-code fonts to open-sans and optimize loading - #41
Merged
Conversation
dabrorius
commented
Aug 10, 2026
|
|
||
| /* Font weights */ | ||
| --font-weight-regular: 400; | ||
| --font-weight-medium: 500; |
Contributor
Author
There was a problem hiding this comment.
Weights 500 and 800 are mentioned, but they were never loaded. We only loaded 400,600,700,400i,600i,700 through the font_link filter.
They would fall back to the closest fall weight silently. Now we explicitly use the font weight that exists.
There was a problem hiding this comment.
Pull request overview
This PR hard-codes the theme’s typography to Open Sans and refactors font loading to be more performant by replacing theme font settings and font_link with explicit, non-blocking Bunny font links.
Changes:
- Removed font picker settings and hard-coded
--font-heading/--font-bodyto"Open Sans". - Replaced
font_linkusage with manualpreconnect,preload(woff2), and non-blocking stylesheet loading. - Updated CSS font-weight usage to align with the reduced set of loaded weights (removing medium/extrabold usage).
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| snippets/form.liquid | Switches form fields to use var(--font-body) instead of theme font settings. |
| snippets/fonts.liquid | Implements manual Bunny font loading with preload + non-blocking stylesheet. |
| snippets/color-palette-styles.liquid | Hard-codes --font-heading and --font-body to Open Sans. |
| layout/theme.liquid | Moves font loading into the head (no longer passes settings into fonts). |
| layout/session.liquid | Moves font loading into the head (no longer passes settings into fonts). |
| layout/minimal.liquid | Moves font loading into the head (no longer passes settings into fonts). |
| layout/checkout.liquid | Moves font loading into the head (no longer passes settings into fonts). |
| config/settings_schema.json | Removes Typography section (font pickers). |
| config/settings_data.json | Removes stored heading_font / body_font settings. |
| assets/product.css | Adjusts product name weight to avoid the removed “medium” variable. |
| assets/image-banner.css | Adjusts banner title weight to avoid the removed “extrabold” variable. |
| assets/core.min.css | Regenerates minified core CSS to reflect updated font-weight variables/usage. |
| assets/base.css | Removes unused font-weight variables (medium, extrabold). |
Files not reviewed (1)
- assets/core.min.css: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
srgzlb
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
We want to improve performance of fonts loading on booking page. This PR does a few different things:
| font_linkfilter and build our own loading links that are non-blocking.Links
Resolves SC-3033
Media