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

[StepIcon] Fix text centering when changing browser font size #32706

Merged
merged 4 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/mui-material/src/StepIcon/StepIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ const StepIcon = React.forwardRef(function StepIcon(inProps, ref) {
<StepIconText
className={classes.text}
x="12"
y="16"
y="12"
textAnchor="middle"
dominantBaseline="central"
ownerState={ownerState}
>
{icon}
Expand Down
17 changes: 17 additions & 0 deletions test/regressions/fixtures/StepIcon/BiggerStepIconREM.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as React from 'react';
import StepIcon from '@mui/material/StepIcon';
import GlobalStyles from '@mui/material/GlobalStyles';

export default function BiggerStepIconREM() {
return (
<React.Fragment>
<GlobalStyles
styles={{
html: { fontSize: '24px' },
}}
/>
<StepIcon completed icon={1} />
<StepIcon icon={2} />
</React.Fragment>
);
}