Skip to content

Fix - Redundant Font Awesome stylesheets loaded alongside all.min.css - #87

Open
rajatgautam755421 wants to merge 3 commits into
developfrom
fix/redundant-font-awesome
Open

rajatgautam755421 wants to merge 3 commits into
developfrom
fix/redundant-font-awesome

Conversation

@rajatgautam755421

Copy link
Copy Markdown

Same fix as themegrill/accelerate-pro#116 (themegrill/accelerate-pro#83, reported by @iamprazol) and Flash (themegrill/flash#120).

all.min.css already contains every rule and @font-face in solid, regular and brands, so those three were duplicate requests on every page. Removed them; v4-shims stays because the theme's markup uses v4 class names (fa fa-*).

Before — 5 stylesheets After — 2 stylesheets, same icons
before after

(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 on develop, passes here.

Changelog: Tweak - Load only the Font Awesome stylesheets the theme needs.

🤖 Generated with Claude Code

rajatgautam755421 and others added 2 commits October 1, 2026 09:35
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@rajatgautam755421

rajatgautam755421 commented Oct 1, 2026 •

Copy link
Copy Markdown
Author

Re the Copilot overview note — valid, fixed in d62f3f3 (test only): requests are now kept as a list instead of a Set, so a stylesheet requested twice (or all.css + all.min.css) fails. Verified with a temporary duplicate all handle. Same change as themegrill/accelerate-pro#116, which also switched the icon check to probe icons added to the page (solid, regular and brand), so it no longer depends on the site having a post.

@deepench deepench left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants