-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Input components fail to build with Pigment CSS without cssVariables
#43615
Comments
This is expected, Pigment CSS only has access to the CSS vars, this is how it's possible not to depend on context for the theme. @brijeshb42 correct me if I am wrong please. We should likely point this out in the migration guide tough @siriwatknp |
Sounds good, I wasn't sure if it was a bug or just something missing in the migration guide. It took a few hours to figure out what was going on though, so I'm sure others would appreciate it getting added to the migration guide. I couldn't figure out what the issue was until I took a look at the example project in |
Yes. It is expected. Thanks for flagging @Methuselah96. We'll get it added to the docs. |
cssVariables
@brijeshb42 This is strange. I'd expect it to work without CSS variables. |
So the issue here seems to be more than the null value. I was able to fix the issue with |
I tested the provided sandbox with the latest version of Pigment CSS and Material UI, it project works fine so this issue is closed. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @Methuselah96 How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Steps to reproduce
Link to live example: https://stackblitz.com/edit/github-gwqtwf?file=src%2FApp.tsx,vite.config.ts
Note that this only happens if
cssVariables
is not set withincreateTheme
invite.config.ts
.Current behavior
The build crashes with these errors:
Expected behavior
Everything works
Context
I am experimenting with migrating to Pigment CSS using the migration guide and ran into these errors. I can fix it by adding
cssVariables: true
increateTheme
invite.config.ts
, but I did not see that mentioned in the migration guide, so I'm assuming this is a bug.Your environment
npx @mui/envinfo
Search keywords: filledinput outlinedinput pigment css
The text was updated successfully, but these errors were encountered: