Skip to content

Icons render as svg symbols (fix icon clipping)#4229

Draft
BrettJephson wants to merge 9 commits intomainfrom
brett/fa-icons-rendering
Draft

Icons render as svg symbols (fix icon clipping)#4229
BrettJephson wants to merge 9 commits intomainfrom
brett/fa-icons-rendering

Conversation

@BrettJephson
Copy link
Copy Markdown
Contributor

@BrettJephson BrettJephson commented Apr 30, 2026

This change fixes the rendering of Font Awesome icons, which can become clipped.

Fixes RND-10291

Because we have been loading in the svg as an image file and applying a mask for colour we could not simply use overflow: visible to prevent clipping of images that overflow the svg’s viewbox. It is already a rasterized image so we only show the bit in the image canvas.

The solution here is to render svg as an actual svg symbol in the document creating a sprite sheet so we are using use and some id throughout the page and only have one instance of the full svg path in a spritesheet.

This better aligns with Font Awesome’s recommended usage on the web and fixes the clipping while keeping the size of icons the same.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

🦋 Changeset detected

Latest commit: 21053f5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@gitbook/icons Minor
gitbook Patch
@gitbook/react-contentkit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

@linear
Copy link
Copy Markdown

linear Bot commented Apr 30, 2026

@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented Apr 30, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Awaiting the start of a new Argos build…

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