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

Display Buttons inline #1933

Merged
merged 3 commits into from
Apr 7, 2023
Merged

Display Buttons inline #1933

merged 3 commits into from
Apr 7, 2023

Conversation

simurai
Copy link
Contributor

@simurai simurai commented Apr 5, 2023

Description

This changes

  • the default Button from flex to inline-flex
  • the Button--iconOnly from grid to inline-grid

This came up in https://github.com/github/github/pull/268064#pullrequestreview-1370516944. Most often the parent element is a flexbox, which takes over the children's display property. But it could cause regressions when migrating cases without a flexbox container or floats since the old btn uses inline-block.

Before After
Screen Shot 2023-04-05 at 14 19 35 Screen Shot 2023-04-05 at 14 19 04

Integration

Does this change require any updates to code in production?

I don't think so. Use cases that already changed to something like inline_block should not be affected.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews

@changeset-bot
Copy link

changeset-bot bot commented Apr 5, 2023

🦋 Changeset detected

Latest commit: 41f83f9

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

This PR includes changesets to release 1 package
Name Type
@primer/view-components 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 github-actions bot added the css Pull requests that update CSS code label Apr 5, 2023
@simurai simurai temporarily deployed to preview April 5, 2023 04:57 — with GitHub Actions Inactive
@simurai simurai temporarily deployed to github-pages April 5, 2023 05:02 — with GitHub Actions Inactive
@simurai simurai changed the title Use inline for Buttons Display Buttons inline Apr 5, 2023
@simurai simurai requested a review from langermank April 5, 2023 05:22
@simurai simurai marked this pull request as ready for review April 5, 2023 05:22
@simurai simurai requested a review from a team as a code owner April 5, 2023 05:22
@simurai simurai requested review from a team and keithamus April 5, 2023 05:22
Copy link
Member

@keithamus keithamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simurai simurai requested a review from jonrohan April 6, 2023 00:09
@jonrohan jonrohan merged commit 92bd784 into main Apr 7, 2023
@jonrohan jonrohan deleted the inline-button branch April 7, 2023 05:00
@primer-css primer-css mentioned this pull request Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css Pull requests that update CSS code patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants