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

lost-align issue #233

Closed
eybarta opened this issue Jan 13, 2016 · 8 comments
Closed

lost-align issue #233

eybarta opened this issue Jan 13, 2016 · 8 comments

Comments

@eybarta
Copy link

eybarta commented Jan 13, 2016

Thx for all your work, very refreshing using this grid and thx Peter for maintaining!

I'm not sure if I'm doing something wrong.. but using lost-align on a parent seems to give the justify-content and align-items properties to the children instead of the parent resulting in incorrect behavior.. I looked @ lost/lib/lost-align.js and it seems the conditional styles are always given to ' > * ',
am I misunderstanding something or is this a bug?

@peterramsing
Copy link
Owner

@eybarta I might be misunderstanding this but it looks to be this works as expected. lost-align is intended to align the child elements. See here: lost-align

Align nested elements. Apply this to a parent container.

Please let me know if this I'm not understanding this correctly. Maybe some of the code you're working with? Thanks!

@corysimmons
Copy link
Contributor

Crap, I think @eybarta is right. justify-content and align-items should be applied to the parent container instead of > *.

lost-align is broken when used with global flexbox or the flex param.

@peterramsing
Copy link
Owner

Will look into this tonight.

@adrian2x
Copy link

I just noticed this too. I thing @eybarta is right too. Unlike the position-based alignment, the flex alignment properties should be applied on the container element, because they specify how a flex element arranges its items. The way that it is implemented right now, it will apply these properties (justify-content and align-items) to the actual children, which will make them in turn flex containers, according to the spec.
PR -> #236

@corysimmons
Copy link
Contributor

🎉

@eybarta
Copy link
Author

eybarta commented Jan 14, 2016

glad this is being addressed
thanks guys 👍

@aguilera51284
Copy link

i have the same problem here :)!

@peterramsing
Copy link
Owner

Fixed here: #339

You'll see this in the beta version soon and in LostGrid v8. 👍

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

5 participants