Open kealjones-wk opened 1 month ago
Heya @kealjones-wk, thanks for the issue! I can shed some light on some of these questions:
sx
prop should remain there.Adding to @danilo-leal's answer, for point 4, not at the moment. Pigment CSS needs source transformations to extract out the css and make the bundle size smaller. We do have a plan in future to make Pigment act as runtime CSS-in-JS as default (internally, it might continue to use Emotion) and if you configure your bundler, it'll do the CSS extraction. So there shouldn't be any worries on your side.
Not that this is actually anything we plan to do, but for point 4 I was mainly curious if Pigment's css
function actually has to be removed or if it would actually return the correct className if it was executed at runtime?
Currently, there is a tiny runtime, but only for the styled
call. Rest all the exports only exist at build-time and are replaced with a string at runtime. So they won't be callable if not transformed.
Related page
https://mui.com/blog/introducing-pigment-css
Kind of issue
Missing information
Issue description
Sorry if this is not the best place to discuss this, I was not sure where to, if you have a better place please point me to that! :)
My team has a very specific way of using material-ui, we expose our components for usage in TypeScript and Dart. Pigment seems to depend on source transformations which would be fine for our TypeScript consumers but would possibly be a hard stopper for our Dart consumers, unless we are able to provide similar functionality with a custom dart build step.
So questions:
emotion
as our sx & styled engine even after Pigment?Context
No response
Search keywords: pigment, css-in-js, emotion, css