Open Jedidiahip opened 3 months ago
I have similar issue , when i trying to migrate from emotion to pigment-css. Some styles of MUI components are not fully loaded initially. Is it works as expected?
I solved with adding a mui class selector to overwrite the default style without css flickering
<Button sx={{
// background:"red",
"&.MuiButtonBase-root":{
background:"red",
}
}}>button</Button>
https://github.com/user-attachments/assets/a3caea21-1e01-45de-8477-efd795964ff6
Steps to reproduce
/src/app/test/test1/page.js
/src/app/test/test1/layout.js
package.json
Current behavior
https://github.com/user-attachments/assets/1a9928b5-e9b1-4766-b7e7-3f4c7016ae51
background of Button is flickering from the default background to the customized background:"red" on page refresh
Expected behavior
background of Button should be colored red after refreshing like the Box
Context
No response
Your environment
``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. in Edge and Chrome System: OS: Linux 6.5 Debian GNU/Linux 10 (buster) 10 (buster) Binaries: Node: 20.8.1 - /usr/local/bin/node npm: 10.1.0 - /usr/local/bin/npm pnpm: Not Found Browsers: Chrome: Not Found npmPackages: @emotion/react: 11.13.0 @emotion/styled: 11.13.0 @mui/core-downloads-tracker: 6.0.0-dev.240424162023-9968b4889d @mui/material: next => 6.0.0-beta.4 @mui/material-pigment-css: ^6.0.0-beta.0 => 6.0.0-beta.4-dev.20240805-092432-9f940a61d6 @mui/private-theming: 6.0.0-dev.20240529-082515-213b5e33ab @mui/styled-engine: 6.0.0-dev.20240529-082515-213b5e33ab @mui/system: 6.0.0-dev.240424162023-9968b4889d @mui/types: 7.2.15 @mui/utils: 6.0.0-dev.20240529-082515-213b5e33ab @types/react: 18.3.3 react: latest => 18.3.1 react-dom: latest => 18.3.1 typescript: 5.5.4 ```npx @mui/envinfo
Search keywords: sx delay