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
Current behavior:
When using prepend: true with the code snippets from #2928, there is FOUC. On the server, emotion styles are always injected before any other CSS which causes style overrides to not be applied.
Expected behavior:
Based on comments in #2928 I got the impression that emotion works with app dir as long as components styled using it have "use client" directive. Is there a way to get prepend to work with app directory?
Environment information:
react version: 18.2.0
@emotion/react version: 11.11.1
The text was updated successfully, but these errors were encountered:
What @kpericin is trying to do is something I don't have a solution for. He's using css modules and he want to ensure that the emotion style are injected before so that he's CSS take precedence over emotion generated style.
In the page router version of the TSS tooling I'm able to implement some magic to get prepend working.
Unfortunately, with the App Router, I don't know how to do it or even if it's possible. We're relying on the useServerInsertedHTML hook and I don't know how to configure it to provide a precise insertion point...
Current behavior:
When using
prepend: true
with the code snippets from #2928, there is FOUC. On the server, emotion styles are always injected before any other CSS which causes style overrides to not be applied.To reproduce:
https://github.com/kpericin/mui-next-appdir-demo/tree/emotion-prepend (or https://stackblitz.com/edit/stackblitz-starters-qmdyic?file=app%2Flayout.tsx if that's easier).
Overridden component is in https://github.com/kpericin/mui-next-appdir-demo/blob/emotion-prepend/shared/AppButton/AppButton.tsx
Expected behavior:
Based on comments in #2928 I got the impression that emotion works with app dir as long as components styled using it have
"use client"
directive. Is there a way to get prepend to work with app directory?Environment information:
react
version: 18.2.0@emotion/react
version: 11.11.1The text was updated successfully, but these errors were encountered: