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

Use CSS3 Flexbox in Grids when possible #190

Merged
merged 5 commits into from
Sep 6, 2013
Merged

Conversation

ericf
Copy link
Collaborator

@ericf ericf commented Sep 5, 2013

This change from @msweeney makes Grids use CSS3 Flexbox when possible in order to avoid the side-effects of setting a negative letter-spacing. The letter-spacing approach is used as a fallback for older browsers, and the Flexbox rules trump it.

This should improve support for Grids across an even larger set of OS/browser combinations, and its ability to withstand the use of non-default fonts when set by either the person in their browser settings or by the developer using custom fonts.

Relates to: #41, #162, #166, #189

ericf added a commit that referenced this pull request Sep 6, 2013
Use CSS3 Flexbox in Grids when possible
@ericf ericf merged commit 9d2bbcc into pure-css:master Sep 6, 2013
@ericf ericf deleted the grid-flexbox branch September 6, 2013 17:25
@ericf ericf mentioned this pull request Sep 9, 2013
@lkraav
Copy link
Collaborator

lkraav commented Jan 13, 2014

This is starting to hurt. It was possibly to use text-align on inline-blocks before. Now with -webkit-flex, is there no similar unified solution? Have to resort to having two rulesets for these browsers?

@ericf
Copy link
Collaborator Author

ericf commented Jan 14, 2014

/cc @msweeney

@msweeney
Copy link
Contributor

I think we rushed the flexbox fix in without proper vetting. There are other side-effects in addition to not supporting text-align, such as creating stacking and block formatting contexts.

Its possible to use class attributes to bind alignment behavior instead of relying on text-align and vertical-align, but rather than continuing to plug holes in the dam here, I think we should probably start fresh with a list of explicit requirements for grids. Implicit requirements for alignment, wrapping/nowrapping, conditional breakpoints, etc. compete with each other to some degree, and have forced us down this rabbit hole of inline-block/flexbox, negative letter-spacing and font-family overriding, breaking our tenet that Pure "Stays out of your way."

If this sounds reasonable, I can take an initial pass at the requirements based on legacy support.

@lkraav
Copy link
Collaborator

lkraav commented Jan 14, 2014

Thanks for the attention. In the meanwhile I simply rearranged some structure for this one project and did some good'ol calculated padding instead of text-align.

But yeah, flexbox is a bit raw for now..

@tilomitra
Copy link
Contributor

@msweeney It would be great if you could take a pass at that, keeping in mind the responsive grid work that we've been doing.

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