-
Notifications
You must be signed in to change notification settings - Fork 90
Description
Summary
In OroCommerce 6.1, Critical CSS generation incorrectly resolves the $global-url variable, breaking font paths when using the official method for setting custom static fonts.
Steps to reproduce
- Follow the official guide to configure custom fonts using $theme-custom-fonts and $global-url:
https://doc.oroinc.com/frontend/storefront/how-to/how-to-change-fonts/ - Add static font files under the custom theme and configure the map accordingly.
- Build assets.
- Inspect both regular CSS and Critical CSS outputs.
Actual Result
In regular CSS:
Font paths are generated correctly, e.g.
build/_static/bundles/customtheme/ThemeBundle/fonts/
In Critical CSS:
Font paths are incorrect, e.g.
_static/bundles/customtheme/ThemeBundle/fonts/
(missing build/ prefix, resulting in 404 errors)
What I tried:
Attempted to override $global-url specifically for Critical CSS context – no effect.
Expected Result
Font paths should be consistent and valid in both regular CSS and Critical CSS. The $global-url should resolve correctly in both contexts, especially since it’s used per official recommendations.
Additionally this change breaks the styleguide (https://doc.oroinc.com/frontend/storefront-style-guide/#download-figma-design-files) when it comes to default font. oroinc/platform@9ac1848#diff-b568627b1737580ca94f40965d8b945e354225f418ac041d9503fa39b1e4c8a3R12
Details about your environment
- OroCommerce version: 6.1
- PHP version: 8.4
- Database (MySQL, PostgreSQL) version: postgres 17