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

[Skeleton] Fix wave animation for styled-components #43740

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Sep 13, 2024

closes #43611

Root cause

The animation wrapped in css is used within an object. This is not allowed:

style: {
  '&::after': css`
    animation: ${keyframe}
  `,
}

The fix is to move the &::after inside the css:

const waveAnimation = css`
  &::after {
    animation: ${keyframe}
  }
`

style: waveAnimation

Note: I check the rest of the components that has animation, all of them are using the right approach.

@siriwatknp siriwatknp added package: material-ui Specific to @mui/material component: skeleton This is the name of the generic UI component, not the React module! regression A bug, but worse package: styled-engine-sc Specific to styled-components v6.x labels Sep 13, 2024
@mui-bot
Copy link

mui-bot commented Sep 13, 2024

Netlify deploy preview

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

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against c07cc74

Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

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

Looks good. Is the limitation of being unable to use css in an object documented somewhere so Pigment CSS users are aware?

@siriwatknp
Copy link
Member Author

Looks good. Is the limitation of being unable to use css in an object documented somewhere so Pigment CSS users are aware?

The issue is related to Styled-components, not Pigment CSS. I don't think we need to document this since styled-components already documented it.

@siriwatknp siriwatknp merged commit e513ea3 into mui:master Sep 13, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: skeleton This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material package: styled-engine-sc Specific to styled-components regression A bug, but worse v6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[material-ui][Skeleton] Error when using animation="wave"
3 participants