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

Centering seems to have failed in the online demo #18

Open
xparq opened this issue Aug 31, 2019 · 1 comment
Open

Centering seems to have failed in the online demo #18

xparq opened this issue Aug 31, 2019 · 1 comment

Comments

@xparq
Copy link

xparq commented Aug 31, 2019

I was just playing around in the nice, and slightly addictive demo, until this state, where item 2, which claims to be centered, isn't. (I thought it may be vertical centering only, but item 1 has its horizontal position similarly displayed, and the parameter list also says "center" for the horizontal position.)

If it's indeed a problem, I think it happened right after setting "left" to item 1.

Anyway, HTH. Very nice work, nonetheless!

image

@StefanKovac
Copy link
Owner

Thanks @lunakid!

You are right. To align item in the same direction as the main axis, margin hack is incorporated - flexbox provides a way to individually align item only on cross axis.

In the above case, when setting the item align to left, margin-right: auto; is applied to the item what makes other items push to the opposite direction.

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

No branches or pull requests

2 participants