Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: space-evenly #284

Closed
soumya92 opened this issue May 16, 2017 · 8 comments
Closed

Feature request: space-evenly #284

soumya92 opened this issue May 16, 2017 · 8 comments
Milestone

Comments

@soumya92
Copy link

With space-around, the space between the first item and the left edge of the flexbox is half the space between items. This is probably because the items have similar spacing to their left and right, but between two items that spacing gets added twice.

It would be nice to have an option for consistent spacing everywhere, even though it's not supported in CSS. Thoughts?

@thagikura
Copy link
Contributor

Thanks for the suggestion, that sounds a reasonable request.

I may be wrong, but I thought I saw a similar attribute in CSS for Flexbox or Grid.
Anyway, I'll keep this as an enhancement.

@soumya92 soumya92 changed the title Feature request: space-around, but with equal spacing Feature request: space-evenly Jul 10, 2017
@soumya92
Copy link
Author

Yeah, turns out CSS Grid already supports space-evenly, and Firefox just started shipping support for space-evenly in flexbox as well

@jjhesk
Copy link

jjhesk commented Nov 14, 2017

is there a support for spacing between items?

@feinstein
Copy link

feinstein commented Feb 13, 2018

@thagikura This would be great to have, some sort of margin that will be equal between all the items and between an item and the screen borders.

@thagikura
Copy link
Contributor

This is now implemented. Will be released in the next release.

@feinstein
Copy link

@thagikura is it possible to make the items centered but with a left justification? For example, if I have 5 items, 3 on the first row and 2 on the second row, they will be centered on the screen, but the 2 items on the second row will be aligned with the 1st and the 2nd items on the first row, as if this was a table? Because right now if I justify them to be centered, the 1st item of the second row will be in the middle of the 1st and 2nd items from the first row.

If it's confusing, please let me know and I will send you a picture.

@thagikura
Copy link
Contributor

Hi @feinstein,

Could you send me a picture?
Also if it's not part of the specification in the original justify-content attribute, it might be difficult to include it in this library because that is going to be counter intuitive.

@feinstein
Copy link

@thagikura right now we can have this:

image

Or this:

image

What I wanted is this:

image

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

No branches or pull requests

4 participants