You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Grid2, lets take an example of one of its props direction, if flexDirection is passed via pigment css or even sx prop, Grid2's default flex direction takes precedence.
Moreover, grid styles appear to go inside <style> in <head> with data-emotion. (Already added transformLibraries: ["@mui/material"]). This is causing it to take precedence over pigment css as pigment css is being applied via layers.
However, for Typography component, its root styles do not go inside <style> in <head> and everything works as expected.
Is this going to change? Or is there any workaround?
Expected behavior
such styles should go in pigment css file like other styles. It should reside in style tag taking over pigment css precedence. or there should be a way to configure this behaviour
Context
No response
Your environment
npx @mui/envinfo
This is from codesandbox env
Behaviour is same on local with same project
To use Grid with Pigment CSS, you'll have to import the Grid from @mui/material-pigment-css/Grid. What you've imported works through emotion. This'll work if emotion's style tag come before the link tags injected by Pigment CSS.
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
@Prabh-Kang 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
You can find the related code here
Current behavior
Grid2
, lets take an example of one of its propsdirection
, ifflexDirection
is passed via pigment css or evensx
prop,Grid2
's default flex direction takes precedence.Moreover, grid styles appear to go inside
<style>
in<head>
withdata-emotion
. (Already addedtransformLibraries: ["@mui/material"]
). This is causing it to take precedence over pigment css as pigment css is being applied via layers.However, for
Typography
component, its root styles do not go inside<style>
in<head>
and everything works as expected.Is this going to change? Or is there any workaround?
Expected behavior
such styles should go in pigment css file like other styles. It should reside in style tag taking over
pigment css
precedence. or there should be a way to configure this behaviourContext
No response
Your environment
npx @mui/envinfo
This is from codesandbox env
Behaviour is same on local with same project
The text was updated successfully, but these errors were encountered: