Closed abriginets closed 1 month ago
Hey, @abriginets! Thanks for the report. We will add a section to the Pigment CSS migration guide to cover this: https://github.com/mui/material-ui/pull/43631/files#diff-603580bb6644e16532b7ca1d7356ab1aa73aa8f9fa68a13664a6406b792db4e5
If you have some time, may I ask you to try this and confirm that is solves your issue? Thanks in advance.
Hello, @DiegoAndai. I tried following steps from updated guide and everything seems to be easy and straighforward, no errors in the terminal now.
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
[!NOTE] We value your feedback @abriginets! How was your experience with our support team? If you could spare a moment, we'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!
Related page
https://mui.com/material-ui/migration/migrating-to-pigment-css/#configuring-the-theme
Kind of issue
Missing information
Issue description
NextJS integration documentation tells us to create a theme and override
Typography
'sfontFamily
with it [https://mui.com/material-ui/migration/migrating-to-pigment-css/#configuring-the-theme]While in Pigment migration docs it doesn't mention the need of changing it to be like this:
I was under impression that the first one was the only way of combining next/font and MUI, so I went by pigment migration docs and imported
Roboto
fromnext/font
directly intonext.config.mjs
:Obviously it didn't work
So here's my point. MUI doesn't explicitly tells you which way is preferable and doesn't force you into any of the possible solutions though one of them works with Pigment and the other one works by default. Is there a difference and how would it affect our apps if there is. I believe it would be better if docs were consistent and advised users to use next/font via passing class name into
body
tag. Or if that's only possible with Pigment, then Pigment migration docs should also highlight this change in the code snippet. Thank you.Context
No response
Search keywords: pigment, nextjs