Description
Describe the bug
So this is an issue and solution we have encountered with Vanilla Extract and App Router - Next13/14. Everything looks fine in development, but as soon as you go to build the application, styles are no longer applied correctly. The classnames are set correctly but the specificity is all screwed up. Basically, what appears to be happening is that the Next build system is placing the wrong styles at the top of the stack. After quite a bit of digging, what we discovered was that the issue could be resolved by removing the reset/default style for the Box element. Anyone working with a design system and encounters this problem can try the remove reset solution. It's more of a temp solution, but it fixed the issue. We tried this with at least a dozen different configurations of versions for vanilla extract and next. This is specificaly an issue on app router, no such issues on pages router.
Reproduction
n/a.
System Info
vanilla-extract
next 13/14
Used Package Manager
yarn
Logs
No response
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.