Remove trailing whitespace from <Badge> and <Icon> components#2924
Remove trailing whitespace from <Badge> and <Icon> components#2924delucis merged 6 commits intowithastro:mainfrom
<Badge> and <Icon> components#2924Conversation
🦋 Changeset detectedLatest commit: e140163 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
delucis
left a comment
There was a problem hiding this comment.
Changes all look great and the the changeset is really excellent and clear 👏
I wish we didn’t need to rely on the weird fragment hack, but I’m glad we at least have good testing in place in case that ever breaks.
…thastro#2924) Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

Description
In Astro, components that include styles render with a trailing space. This behavior is not ideal for components like
<Badge>and<Icon>that are often used in inline text.For example, the following code:
will render as:
This PR removes the trailing space from
<Badge>and<Icon>components by wrapping them in a fragment which prevents the trailing space from being rendered.If we ship this change and its associated documentation change to accommodate the new behavior, we could potentially update the docs for all languages as it's purely structural changes and mark it as i18n ignored