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
I have a project where I'm using SASS modules for all the styles. There are two pages that share a button component with default styles. On page A the button component has some of it's styles modified with a class. However, if I hover over the link to page B, in production, Next fetches the JS for page B including the styles. When this happens the styles from page B override those from page A and the button style is reset to the default.
A workaround for me would be to use greater specificity to protect the styles on page A.
However, it's an unexpected behavior to have styles from one page impact another page like this. Especially being the only interaction needed to trigger this is hovering over a link. This only happens in production. I wouldn't be surprised if there are other people out there with the same issue who haven't realized it yet.
This discussion was converted from issue #14007 on June 10, 2020 11:32.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a project where I'm using SASS modules for all the styles. There are two pages that share a button component with default styles. On page A the button component has some of it's styles modified with a class. However, if I hover over the link to page B, in production, Next fetches the JS for page B including the styles. When this happens the styles from page B override those from page A and the button style is reset to the default.
A workaround for me would be to use greater specificity to protect the styles on page A.
However, it's an unexpected behavior to have styles from one page impact another page like this. Especially being the only interaction needed to trigger this is hovering over a link. This only happens in production. I wouldn't be surprised if there are other people out there with the same issue who haven't realized it yet.
Beta Was this translation helpful? Give feedback.
All reactions