Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icons: Support rendering inline as child of a flex container #1585

Merged
merged 5 commits into from
Sep 19, 2024

Conversation

michaeltaranto
Copy link
Contributor

When rendering our icons with inline sizing, i.e. inside of Text or Heading components, they use negative margins and specific height and width values to improve alignment with the surrounding text. However, if when used as a direct child in a flex container, the values behave differently.

This PR wraps the icon in a inline-block element (when using inline sizing) to ensure predictable sizing and spacing when used in our layout components or as a flex item.

@michaeltaranto michaeltaranto requested a review from a team as a code owner September 18, 2024 06:36
Copy link

changeset-bot bot commented Sep 18, 2024

🦋 Changeset detected

Latest commit: 3f10f67

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

This PR includes changesets to release 1 package
Name Type
braid-design-system 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

@askoufis
Copy link
Contributor

Is it worth adding a screenshot test for this?

@michaeltaranto
Copy link
Contributor Author

Yeah good call. I'll add this in:

image

@michaeltaranto michaeltaranto merged commit 8be4de5 into master Sep 19, 2024
6 checks passed
@michaeltaranto michaeltaranto deleted the icon-layout-update branch September 19, 2024 00:49
@seek-oss-ci seek-oss-ci mentioned this pull request Sep 19, 2024
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.

2 participants