question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Server side rendering wrong css styles

See original GitHub issue

I’ve got Header that renders different elements depending on viewport. When mobile page is loaded, some css styles from desktop viewport are stay on mobile viewport elements, which is strange:

<Breakpoint medium up>
  <div1 />
  <div2 className='a' />
  <div3 />
</Breakpoint>
<Breakpoint small down>
  <div4 />
  <div5 />
  <div6 />
</Breakpoint>

on mobile viewports results in:

...
  <div4 />
  <div5 className='a' />
  <div6 />
...

Where <divN> some component.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
cyril94440commented, Mar 21, 2020

Same issue here… 😦 Too bad this library could be very useful

0reactions
flexdineshcommented, Apr 8, 2021

There is no magical fix for this but setDefaultWidth API published as part of v2.2.0 will help with this. This is a popular issue and I’m gonna keep it open for other folks who might run into similar problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Render CSS on Server Side with React and Isomorphic-Style ...
Render CSS on Server Side with React and Isomorphic-Style-Loader · 1. Install the loader · 2. Make sure to use it on both...
Read more >
Next.js is not rendering CSS in Server Side Rendering
I noticed that imported .css styles are being rendered properly in Client Side Render but not on Server Side Render. According to Next.js ......
Read more >
How To Render CSS on React App Servers | DigitalOcean
In this article, we will go over the challenges of rendering CSS on the server and then demonstrate how we can overcome these...
Read more >
Adding style to Server-Side rendering and automating the ...
It's important to import CSS in an above-mentioned way as simply importing it as import 'styles.css' will throw an error. Two instances of...
Read more >
Advanced Usage - styled-components
Theming, refs, Security, Existing CSS, Tagged Template Literals, Server-Side Rendering and Style Objects.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found