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.

Missing flexbox styles on <Flex> component

See original GitHub issue

I really enjoy working with Rebass, thanks for all the effort you’ve put in this project!

After upgrading to Styled Components v4 and Rebass v3 it seems like every prop on every component works except the props specific to the <Flex> (eg. display: flex; alignItems="center") component.

Example code

    <Flex px={3} py={4} alignItems="center">
      <Box px={3} py={5} color="white" bg="blue">
        <Heading as="h1" fontSize={[4, 5, 6]}>
          Hello, Rebass
        </Heading>
      </Box>
      <Box px={3} py={5} color="white" bg="blue">
        <Heading as="h1" fontSize={[4, 5, 6]}>
          Hello, Rebass
        </Heading>
      </Box>
    </Flex>

Inspector screen shot 2018-09-14 at 23 55 45

I’m using the Gatsby Starter Default v2 and added Rebass and Styled Components to it. I’ve been trying to get it to work but without any luck.

Debugging steps taken

  • Updated all packages to latest versions
  • Removed and reinstalled node modules
  • Removed cache (browser and Gatsby)
  • Removed babel-plugin-styled-components

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
BartvdWaerdencommented, Sep 21, 2018

@jxnblk I’ve tested it, and everything seems to be working as it should right now!

I think you can close this issue, thanks for your fast respons and keep making awesome stuff!

1reaction
BartvdWaerdencommented, Sep 15, 2018

Found a solution while checking the deployment logs in Netlify.

Netlify installs the dependencies using Yarn (yarn install). Locally I was using NPM (npm install). When I switched to Yarn my problem was solved. Not sure why though…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flexbox: div is missing - Stack Overflow
Can somebody explain why the last is missing (X and Y) and how to solve the problem? There should be 3 elements visible:....
Read more >
Relationship of flexbox to other layout methods - CSS
Flexbox provides access to properties that allow the alignment of items on their cross axis and justification of items on the main axis....
Read more >
A Complete Guide to Flexbox | CSS-Tricks
This establishes the main-axis, thus defining the direction flex items are placed in the flex container. Flexbox is (aside from optional ...
Read more >
slds - flex direction css class not found in lightningdesignsystem
It's good but some Flexbox property is missing. Like Flex Direction css is missing. They are set .slds-grid{ display: flex;} but they are...
Read more >
Understanding Flexbox: Everything you need to know
To use the Flexbox model, you must make a parent element a flex container (AKA flexible container). You do this by setting display:...
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