Missing flexbox styles on <Flex> component
See original GitHub issueI 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
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:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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!
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…