[x] I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
CSS renders the same both in SSR and JS modes.
Current Behavior
CSS renders correctly with JS being blocked but is overridden by incorrect one once JS loads.
Steps to Reproduce
No explicit steps to repro yet as I'm trying to make a minimal reproducible example.
The problem appears one I hook up the withRoot from the gatsby example. It fixes the SSR rendering, e.g. given the following (taken from material-ui-kit):
notice how it has the color from the material-kit-react.jsx, while still including other fields, e.g. margin-top.
To make sure this isn't an off-by-one I've added borderRadius: 515 to the landingPage.jsx style and borderRadius: 909 to its parent in material-kit-react.jsx (just random numbers). As I expected, the rendered JSS page has the 515 version and the JS one has 909.
I've started tracing this bug in https://github.com/cssinjs/react-jss/issues/306 but now I'm not sure it belongs there. More so, I have no idea where to start working on a minimal reproducible version of this as it goes against my knowledge of JS. Any hints?
Expected Behavior
CSS renders the same both in SSR and JS modes.
Current Behavior
CSS renders correctly with JS being blocked but is overridden by incorrect one once JS loads.
Steps to Reproduce
No explicit steps to repro yet as I'm trying to make a minimal reproducible example.
The problem appears one I hook up the
withRoot
from the gatsby example. It fixes the SSR rendering, e.g. given the following (taken from material-ui-kit):The title style in the SSR page would resolve to the following:
which looks like an exact representation of the original style. However the JS-injected style is incorrect:
notice how it has the color from the
material-kit-react.jsx
, while still including other fields, e.g.margin-top
.To make sure this isn't an off-by-one I've added
borderRadius: 515
to thelandingPage.jsx
style andborderRadius: 909
to its parent inmaterial-kit-react.jsx
(just random numbers). As I expected, the rendered JSS page has the 515 version and the JS one has 909.I've started tracing this bug in https://github.com/cssinjs/react-jss/issues/306 but now I'm not sure it belongs there. More so, I have no idea where to start working on a minimal reproducible version of this as it goes against my knowledge of JS. Any hints?