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

Flex flavor (w/ webkit prefixes) #4

Closed
wants to merge 7 commits into from

Conversation

sherbrow
Copy link

@sherbrow sherbrow commented Jun 1, 2015

The flex flavored version as I think it would allow a lot more than mere tables.

Safari is till using prefixes but that's not too problematic I guess : Can I Use Flex

Added a doc page too (a copy of the index.html) and it would be even better if it explained the flex version and a few of the very useful flex properties (maybe even a .css with classes to apply those properties to the rows and cols).

http://sherbrow.github.io/ungrid/flex.html

@hsleewis
Copy link

👍 awesome!

@chrisnager is this something you want to add as an extra "option" in ungrid?

@chrisnager
Copy link
Owner

@sherbrow Thanks for the contribution! This is outstanding work. Let me review to see if this could be an appropriate alternative layout option for ungrid. (cc: @hsleewis)

@sherbrow
Copy link
Author

Any news ?
It's all right if you don't want to merge and associate flex with ungrid, I'll create a whole different project and we can link back to each project for appropriate guiding.

@rkusa
Copy link

rkusa commented Jul 25, 2015

Hi @sherbrow, I've just noticed that the column widths are not distributed evenly with using flex-grow: 1 (instead of flex: 1). Example: http://codepen.io/anon/pen/gpBvma

Adding an additional flex-basis: 0 seems to help (or replace flex-grow with flex: 1 0 0).

@rkusa
Copy link

rkusa commented Jul 25, 2015

Maybe worth adding: another nice way for specific column widths: flex-grow: 1.5, flex-grow: 2, ... (take 1.5 times, take 2 times, ... the place compared for flex-grow: 1 (or flex-grow: .1 to think the other way around, ie. 10% width)

@sherbrow
Copy link
Author

@rkusa It is the expected behavior of flex, a little like table cells that adapt to their content.
When you'd really want alignment whatever the content is, I guess you would use the flex basis to fix the size of the columns (% size for example).

I'm not sure forcing the basis to 0 is the best default behavior, even considering it is the default value of the flex shorthand.

About flex-grow values, if people wanted weighted columns, they might not get what they want from a minimized css grid.
The direction, wrapping, alignment, and eventually ordering, are really nice out-of-the box properties though that I think should complete all that.

@rkusa
Copy link

rkusa commented Jul 25, 2015

@sherbrow Thanks for the response! Yes it is, I just wanted to note that the current behaviour is different from that of ungrid using the table layout approach (with fixed table layout).
I agree that people probably don't get the expected behaviour using proportional values for the size.

@hsleewis
Copy link

@chrisnager have you had the time to review? :-)

@chrisnager
Copy link
Owner

I chose to keep ungrid a purely table-based CSS grid system. I added a flexbox flavor of ungrid similar to yours in the README and included a reference to your pull request.

@sherbrow Thank you for your contributions and apologies on the late decision.

@chrisnager chrisnager closed this Dec 24, 2016
@sherbrow
Copy link
Author

@chrisnager Thank you for the late effort ! Very much appreciated ;)

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

Successfully merging this pull request may close these issues.

4 participants