Skip to content
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.

Add block display option for terminal flex items. #48

Closed
wants to merge 2 commits into from

Conversation

ayc92
Copy link

@ayc92 ayc92 commented Jan 15, 2018

Solves this this issue by adding a display: block option. Rather than building logic in the API that determines whether the <Flexbox /> instance is a flex container or flex item, we can leave it up to the API consumer to manually set the display to whatever they need.

@ayc92
Copy link
Author

ayc92 commented Jan 15, 2018

@nachoaIvarez Could you re-run the build? I fixed the snapshot errors, but I can't re-run the build.

@ayc92 ayc92 closed this Jan 15, 2018
@ayc92
Copy link
Author

ayc92 commented Jan 15, 2018

Don't need this actually.

@ayc92 ayc92 reopened this Jan 16, 2018
@ayc92
Copy link
Author

ayc92 commented Jan 16, 2018

Actually, I take that back. Still need this. I didn't notice that there were defaultProps, which will set the display to flex.

@nachoaIvarez
Copy link
Owner

I don't agree with this change, @ayc92 😔. It's a design decision that the flexbox element is, indeed a flexbox container. Either with display: flex or display: inline-flex. I don't think it makes semantic sense that a flexbox container doesn't use one of those. Please if you still feel strong about this, reopen the PR or move the discussion to an issue. Thanks for your contribution 👍

@ayc92
Copy link
Author

ayc92 commented Jan 22, 2018

@nachoaIvarez I agree that flexbox containers shouldn't use one of those, but what do you do about flexbox children? Flexbox children that aren't themselves containers shouldn't be display: flex, right?

@nachoaIvarez
Copy link
Owner

Why not just a div 😄 ?

@ayc92
Copy link
Author

ayc92 commented Jan 23, 2018

The way I understand it is that a div doesn't take flexbox children props like flex and align-self, so if we wanted to add those styles, we'd have to do them through CSS or inline? I was hoping the API would provide a way to set flex child props.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants