Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions packages/mui-material/src/CardHeader/CardHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ const CardHeaderContent = styled('div', {
slot: 'Content',
})({
flex: '1 1 auto',
[`.${typographyClasses.root}:where(& .${cardHeaderClasses.title})`]: {
display: 'block',
},
[`.${typographyClasses.root}:where(& .${cardHeaderClasses.subheader})`]: {
display: 'block',
},
[`.${typographyClasses.root}:where(& .${cardHeaderClasses.title}), .${typographyClasses.root}:where(& .${cardHeaderClasses.subheader})`]:
{
display: 'block',
},
});

const CardHeader = React.forwardRef(function CardHeader(inProps, ref) {
Expand Down
10 changes: 4 additions & 6 deletions packages/mui-material/src/ListItemText/ListItemText.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ const ListItemTextRoot = styled('div', {
minWidth: 0,
marginTop: 4,
marginBottom: 4,
[`.${typographyClasses.root}:where(& .${listItemTextClasses.primary})`]: {
display: 'block',
},
[`.${typographyClasses.root}:where(& .${listItemTextClasses.secondary})`]: {
display: 'block',
},
[`.${typographyClasses.root}:where(& .${listItemTextClasses.primary}), .${typographyClasses.root}:where(& .${listItemTextClasses.secondary})`]:
{
display: 'block',
},
variants: [
{
props: ({ ownerState }) => ownerState.primary && ownerState.secondary,
Expand Down
13 changes: 4 additions & 9 deletions packages/mui-material/src/SpeedDialIcon/SpeedDialIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ const SpeedDialIconRoot = styled('span', {
[`& .${speedDialIconClasses.icon}`]: {
transform: 'rotate(45deg)',
},
[`& .${speedDialIconClasses.openIcon}`]: {
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.

I'm not 100% familiar with this part yet. Is this the same as the rule below, where we have ownerState.open?

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.

File actually had duplicated variant block where props: ({ ownerState }) => ownerState.open

Block 1 is this => https://github.com/sai6855/material-ui/blob/d839f20151b49d97610eaea8b0f884765502952b/packages/mui-material/src/SpeedDialIcon/SpeedDialIcon.js#L60

Other block i had removed here https://github.com/mui/material-ui/pull/47838/changes#diff-e464bf0b1e5a928e7ddbf84959a83bc5202e35057df3a288579c553b81444e76L76

So instead of having multiple props: ({ ownerState }) => ownerState.open , i moved both to 1 variant block

transform: 'rotate(0deg)',
opacity: 1,
},
},
},
{
Expand All @@ -72,15 +76,6 @@ const SpeedDialIconRoot = styled('span', {
},
},
},
{
props: ({ ownerState }) => ownerState.open,
style: {
[`& .${speedDialIconClasses.openIcon}`]: {
transform: 'rotate(0deg)',
opacity: 1,
},
},
},
],
})),
);
Expand Down
5 changes: 1 addition & 4 deletions packages/mui-material/src/StepIcon/StepIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ const StepIconRoot = styled(SvgIcon, {
duration: theme.transitions.duration.shortest,
}),
color: (theme.vars || theme).palette.text.disabled,
[`&.${stepIconClasses.completed}`]: {
color: (theme.vars || theme).palette.primary.main,
},
[`&.${stepIconClasses.active}`]: {
[`&.${stepIconClasses.completed}, &.${stepIconClasses.active}`]: {
color: (theme.vars || theme).palette.primary.main,
},
[`&.${stepIconClasses.error}`]: {
Expand Down
6 changes: 1 addition & 5 deletions packages/mui-material/src/StepLabel/StepLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ const StepLabelLabel = styled('span', {
transition: theme.transitions.create('color', {
duration: theme.transitions.duration.shortest,
}),
[`&.${stepLabelClasses.active}`]: {
color: (theme.vars || theme).palette.text.primary,
fontWeight: 500,
},
[`&.${stepLabelClasses.completed}`]: {
[`&.${stepLabelClasses.active}, &.${stepLabelClasses.completed}`]: {
color: (theme.vars || theme).palette.text.primary,
fontWeight: 500,
},
Expand Down
Loading