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
Notice that the background-color style from 2.scss has persisted.
Expected behavior
I expect that changing the path with remove any styles that are not needed for that page. Notice that even if you hard refresh /one, the orange background remains. In other words, styles from 2.scss are "leaking" into 1.scss and thus into /one
System information
OS: Linux
Browser (if applies) Chrome
Version of Next.js: 9.2.3-canary.6
Thanks for your help!
The text was updated successfully, but these errors were encountered:
JayJohn1869
changed the title
.scss styles leaking to wrong pages
.scss styles leaking to other pages
Feb 20, 2020
This is no longer the case when #10134 lands on stable. Reason it currently happens is that you're using global styles using next-sass (which will be obsolete when built-in support lands).
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 30, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The bug
When styling components for one page, (eg. div), the style leaks to other pages (ie. all divs on other pages are styled as well)
To Reproduce
Visit my codesandbox which contains minimal code to exhibit this behavior
/one
Notice that the
background-color
style from2.scss
has persisted.Expected behavior
I expect that changing the path with remove any styles that are not needed for that page. Notice that even if you hard refresh
/one
, the orange background remains. In other words, styles from2.scss
are "leaking" into1.scss
and thus into/one
System information
Thanks for your help!
The text was updated successfully, but these errors were encountered: