-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix[sdks]: centering items in columns #3979
fix[sdks]: centering items in columns #3979
Conversation
🦋 Changeset detectedLatest commit: 12c81b3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
View your CI Pipeline Execution ↗ for commit 12c81b3.
☁️ Nx Cloud last updated this comment at |
expect(textCenters[0]).toBeCloseTo(columnCenter, 1); | ||
expect(textCenters[1]).toBeCloseTo(columnCenter, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here textCenters[0]
should be equal to textCenters[1]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, both are vertically centered
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
when we vertically center two individual elements we use
margin-top: auto
,margin-bottom: auto
to keep the elements in the center. Turns out the builder-columns box doesn't respect height and shrinks to what’s required and height gets applied to the root div (as we don’t use noWrap true in case of columns). To fix this, we are addingheight: 100%
to make sure that we respect the root div's height (if provided)Jira
https://builder-io.atlassian.net/browse/ENG-8386
Screenshot
If relevant, add a screenshot or two of the changes you made.