next.js
next.js copied to clipboard
Styles rendering different between SSR/CSR
Noticed a css bug/difference between SSR and CSR, when toggling javascript on and off.
CSS is being rendered backwords or incorrectly. Also using import 'glamor/reset' seems to cause double reset stylesheets.
Here is the component and styles. https://gist.github.com/FrancosLab/6627597a0df0a9467a5c5f8b4e6e2cd7
Edit, there's a work around for the gist above
const baseStyles = styles;
const secondaryStyles = layout === 'rtl' ? rtlStyles : {}
const css = merge(baseStyles, secondaryStyles);
Only SSR with javascript off. (incorrect)

With Javascript. (correct)

We don't recommend using of glamor reset as you would have to do it per-page anyways. Please look at the global styles wiki page: https://github.com/zeit/next.js/wiki/Global-styles-and-layouts