Skip to content

perf: Replace Font Awesome with inline svg icons - #890

Merged
lfrancke merged 2 commits into
mainfrom
perf/fa-inline-svg
Jul 28, 2026
Merged

perf: Replace Font Awesome with inline svg icons#890
lfrancke merged 2 commits into
mainfrom
perf/fa-inline-svg

Conversation

@lfrancke

@lfrancke lfrancke commented Jul 16, 2026

Copy link
Copy Markdown
Member

Description

This builds on the work done in #889

And it continues the work to improve our PageSpeed scores.

This is what I get on the preview:
image

And this is what I get on the live site, so quite an improvement (you can ignore the SEO score, due to the preview URL):

image

What tihs does in a nutshell:
We used to ship all of the Font Awesome package + eight webfont files for seven symbols we used from those. So that's about 400kB of stuff gone from every page load 🥳

I let Claude inline those SVGs into one icons.svg file keeping proper attribution.

Drive-by: removes the inlineDynamicImports rollup option that Vite 8 warns is redundant.

The preview looks good to me. Look for the icons (external-link arrow in the top bar, content links, search icons, the social icons, ...). It all looks good to me.

@lfrancke
lfrancke force-pushed the perf/fa-inline-svg branch from 30b206b to f38363b Compare July 16, 2026 07:26
@lfrancke
lfrancke force-pushed the perf/fonts-and-caching branch from ebb98f1 to 7af036a Compare July 16, 2026 07:34
@lfrancke
lfrancke force-pushed the perf/fa-inline-svg branch from f38363b to c68ab8d Compare July 16, 2026 07:34
@lfrancke
lfrancke marked this pull request as draft July 21, 2026 08:42
@lfrancke
lfrancke force-pushed the perf/fonts-and-caching branch from 7af036a to 1b9508a Compare July 21, 2026 08:50
@lfrancke
lfrancke force-pushed the perf/fa-inline-svg branch from c68ab8d to c93fa90 Compare July 21, 2026 08:50
@lfrancke
lfrancke force-pushed the perf/fonts-and-caching branch from 1b9508a to 455d079 Compare July 21, 2026 08:51
@lfrancke
lfrancke force-pushed the perf/fa-inline-svg branch from c93fa90 to 1626ee0 Compare July 21, 2026 08:51
@lfrancke
lfrancke force-pushed the perf/fonts-and-caching branch from 455d079 to b322948 Compare July 21, 2026 08:56
@lfrancke
lfrancke force-pushed the perf/fa-inline-svg branch from 1626ee0 to 278b11d Compare July 21, 2026 08:56
Base automatically changed from perf/fonts-and-caching to main July 28, 2026 06:55
Font Awesome shipped 137 kB of css and eight webfont files for seven
glyphs: the external-link arrow, the search magnifier, the glossary
link icon and four social icons in the footer. Those are inline svgs
now (path data from Font Awesome Free 6.2.1, CC BY 4.0, attributed in
ui/NOTICE), sized and colored via a small .svg-icon utility class.

site.css shrinks from 146 kB to 48 kB and the webfonts/ directory
disappears from the bundle. The fa-* checklist selectors in doc.css
stay: they come from upstream and draw the check marks with css
content, independent of any icon font.

Also removes the inlineDynamicImports rollup option (vite 8 warns it
is redundant for non-code-split builds).
@lfrancke
lfrancke marked this pull request as ready for review July 28, 2026 07:19
@lfrancke
lfrancke force-pushed the perf/fa-inline-svg branch from 278b11d to 4d4bc37 Compare July 28, 2026 07:19
@netlify

netlify Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for stackable-docs ready!

Name Link
🔨 Latest commit ae0626b
🔍 Latest deploy log https://app.netlify.com/projects/stackable-docs/deploys/6a685e2967e9930008958a6d
😎 Deploy Preview https://deploy-preview-890--stackable-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

All seven icons live as symbols in img/icons.svg; usage sites reference
them with <use>, which keeps the markup readable and the path data in
one reusable, cacheable place. currentColor inheritance works through
<use>, so the .svg-icon styling is unchanged. Antora relativizes the
root-relative sprite url in page content, so the external-link-icon
attribute works from any page depth.

The universal-nav partials keep their own pre-existing inline svgs;
they can move into the sprite when that area is next touched.
@lfrancke
lfrancke force-pushed the perf/fa-inline-svg branch from 8127bb8 to ae0626b Compare July 28, 2026 07:45
@lfrancke lfrancke self-assigned this Jul 28, 2026
@lfrancke lfrancke moved this to Development: Waiting for Review in Stackable Engineering Jul 28, 2026
@lfrancke
lfrancke requested a review from xeniape July 28, 2026 08:00
@lfrancke

Copy link
Copy Markdown
Member Author

It looks big (22 files) but once you look at it you'll see it's mostly removals.

@lfrancke
lfrancke enabled auto-merge July 28, 2026 08:22

@NickLarsenNZ NickLarsenNZ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lfrancke
lfrancke added this pull request to the merge queue Jul 28, 2026
@NickLarsenNZ NickLarsenNZ moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Jul 28, 2026
@NickLarsenNZ NickLarsenNZ moved this from Development: In Review to Development: Done in Stackable Engineering Jul 28, 2026
Merged via the queue into main with commit f19129f Jul 28, 2026
8 checks passed
@lfrancke
lfrancke deleted the perf/fa-inline-svg branch July 28, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Done

Development

Successfully merging this pull request may close these issues.

2 participants