Skip to content

Styles rendering different between SSR/CSR #403

@FrancosLab

Description

@FrancosLab

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)
ssr

With Javascript. (correct)
js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions