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.

Conditional groups with nested not working (SSR)

See original GitHub issue

Expected behavior:

const styles = ({ color, breakpoint }) => ({
  container: props => ({
    overflow: props.hidden ? 'auto' : 'unset',
    '&>h2': {
      color: color.text,
      fontSize: '1.5rem',
      paddingBottom: '1rem',
    },
  }),
  [breakpoint.small]: {
    container: {
      overflow: 'unset',
      '&>h2': {
        fontSize: '1.875rem',
        paddingBottom: '1.875rem',
      },
    },
  },
});

Normally on desktop my H2 font size must be 1.875rem Describe the bug: With the first SSR rendering, font-size is correct (1.875rem). After client load, font-size go back to 1.5rem

Versions:

  • jss: v10.0.0-alpha.9
  • next: v7.0.2
  • Browser [e.g. chrome, safari]: Chrome
  • OS [e.g. Windows, macOS]: MacOS

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
PatrykRudzinskicommented, Feb 8, 2019

@HeadFox try to write rule inside breakpoint as function too.

1reaction
HenriBeckcommented, Feb 8, 2019

Not sure why it doesn’t work, maybe because your rule is a function.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next.js dynamic content – how I solved nested view switching ...
I should simply pass the state into the application to perform a conditional rendering of the element. But this time, things got complicated ......
Read more >
How to use multiple conditions (With AND) in IIF expressions ...
For the first 2 rows all the quantities are 0 (ZERO), i want to hide these 2 rows. enter image description here. How...
Read more >
Conditional Rendering - Vue.js
In this case we can use v-if on a <template> element, which serves as an invisible wrapper. The final rendered result will not...
Read more >
Conditional Formatting with SSRS - SQLServerCentral
I'm going to use a couple of nested IIf functions for this. Again, open up the Expression Window for the Text Box's Font...
Read more >
Building recursively nested @angular reactive forms: a clean ...
It's recursively nested. You can see that Group 2 has a Nested Group 1 inside it and both of them are structurally identical....
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