Fix - Redundant Font Awesome stylesheets loaded alongside all.min.css - #87
rajatgautam755421 wants to merge 3 commits into
Conversation
all.min.css already contains every rule and @font-face that solid, regular and brands contain, so those three stylesheets were duplicate requests on every page. v4-shims stays: the theme's markup uses v4 class names (fa fa-*), which only the shim maps. Same fix as Flash. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Same fix as themegrill/accelerate-pro#83.
…ll rendering Replaces the quarantined ACCELERATE-004 spec: asserts exactly all + v4-shims (minified or unminified) and that a solid and a regular v4 icon in the post meta render from a loaded Font Awesome face. Fails on develop (3 extra stylesheets); the glyph check fails if all.css is missing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Update the regression test to assert individual requests so duplicate stylesheets cannot pass unnoticed.
Review effort: Lite
Findings: None
What changed in this PR
This PR removes redundant Font Awesome stylesheet requests while retaining all and v4-shims, with regression coverage for stylesheet loading and icon rendering.
Changes:
- Removes duplicate solid, regular, and brands enqueues.
- Adds request and icon-rendering regression checks.
| File | Summary |
|---|---|
tests/e2e/specs/performance/font-awesome-single-bundle.spec.ts |
Verifies stylesheet requests and icon rendering; duplicate requests may be hidden by Set usage. |
inc/functions.php |
Retains only the all and v4-shims stylesheets. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ent of site content Copilot review: a Set hid a stylesheet requested twice (or both all.css and all.min.css), and the icon check depended on the homepage having a post. Requests are now kept as a list, so a duplicate fails; a v4 solid, regular and brand icon are added to the page and must each load a Font Awesome face, which also covers brands.min.css, one of the removed files. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Re the Copilot overview note — valid, fixed in d62f3f3 (test only): requests are now kept as a list instead of a |
Same fix as themegrill/accelerate-pro#116 (themegrill/accelerate-pro#83, reported by @iamprazol) and Flash (themegrill/flash#120).
all.min.cssalready contains every rule and@font-faceinsolid,regularandbrands, so those three were duplicate requests on every page. Removed them;v4-shimsstays because the theme's markup uses v4 class names (fa fa-*).(Pro shown; Free uses the byte-identical Font Awesome bundle.)
Regression: 11 pages × desktop/mobile, 205 icons: same glyph, font, weight and pixels before/after; font files and errors unchanged. The quarantined spec now asserts exactly
all+v4-shims(not one — the shim is needed) and that a solid + regular icon still render; fails ondevelop, passes here.Changelog: Tweak - Load only the Font Awesome stylesheets the theme needs.
🤖 Generated with Claude Code