Skip to content

perf: Replace Font Awesome with inline svg icons#890

Open
lfrancke wants to merge 1 commit into
perf/fonts-and-cachingfrom
perf/fa-inline-svg
Open

perf: Replace Font Awesome with inline svg icons#890
lfrancke wants to merge 1 commit into
perf/fonts-and-cachingfrom
perf/fa-inline-svg

Conversation

@lfrancke

@lfrancke lfrancke commented Jul 16, 2026

Copy link
Copy Markdown
Member

Description

Second slice of the performance batch, stacked on #889 (retargets to main when that merges).

Font Awesome shipped 137 kB of css + eight webfont files (~350 kB) for exactly seven glyphs: the external-link arrow ({external-link-icon} in the playbooks + 4 uses in the universal navbar), the search magnifier, the glossary link icon, and the xing/linkedin/github/twitter icons in the footer.

  • All seven are inline svgs now - path data from Font Awesome Free 6.2.1 (CC BY 4.0; the ui/NOTICE entry is updated to cover exactly that), one .svg-icon utility class for fill/alignment, sizes matching the previous fa-xs/fa-sm/default rendering.
  • site.css: 146 kB → 48 kB. webfonts/ disappears from the bundle.
  • The fa-* checklist selectors in doc.css stay - upstream draws those check marks with css content, no icon font involved.
  • Drive-by: removes the inlineDynamicImports rollup option that Vite 8 warns is redundant.

Review hint

Since this is stacked, there's no automatic deploy preview. The icons to eyeball once #889 merges (or via a temporary draft PR against main): external-link arrows in the top navbar and content links, the search icon in the header, footer social icons, and the glossary's link icons.

@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
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 force-pushed the perf/fa-inline-svg branch from f38363b to c68ab8d Compare July 16, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant