Skip to content

[button] Fix customized flex gap styles#48542

Merged
mj12albert merged 2 commits into
mui:masterfrom
mj12albert:fix-button-baseline-icon-alignment
May 19, 2026
Merged

[button] Fix customized flex gap styles#48542
mj12albert merged 2 commits into
mui:masterfrom
mj12albert:fix-button-baseline-icon-alignment

Conversation

@mj12albert
Copy link
Copy Markdown
Member

@mj12albert mj12albert commented May 18, 2026

@mj12albert mj12albert added scope: button Changes related to the button. type: regression A bug, but worse, it used to behave as expected. labels May 18, 2026
@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 18, 2026

Deploy preview

https://deploy-preview-48542--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material ▼-66B(-0.01%) ▼-17B(-0.01%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@mj12albert mj12albert force-pushed the fix-button-baseline-icon-alignment branch from 611a555 to 33ac7bc Compare May 18, 2026 11:39
@mj12albert mj12albert force-pushed the fix-button-baseline-icon-alignment branch from 33ac7bc to fbc66cf Compare May 18, 2026 12:01
@mj12albert mj12albert marked this pull request as ready for review May 18, 2026 12:10
Copy link
Copy Markdown
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

Makes sense. Looks good to me.

},
})(({ theme }) => ({
display: 'inherit',
alignItems: 'center',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

necessary?

Copy link
Copy Markdown
Member

@ZeeshanTamboli ZeeshanTamboli May 19, 2026

Choose a reason for hiding this comment

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

I think it is because the ::before content is inside the Icon <span> container, so it would be a flex item.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep it's to keep the icon centered

Copy link
Copy Markdown
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

one minor comment

@mj12albert mj12albert enabled auto-merge (squash) May 19, 2026 11:22
@mj12albert mj12albert merged commit f18f52f into mui:master May 19, 2026
18 checks passed
@mj12albert mj12albert deleted the fix-button-baseline-icon-alignment branch May 19, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: button Changes related to the button. type: regression A bug, but worse, it used to behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[button ]v9.0.1 breaks layout with custom CSS gap

3 participants