Skip to content

perf: Replace Font Awesome with inline svg icons#890

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

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