Skip to content

Use Flexbox when browser @supports it unprefixed#377

Closed
SelenIT wants to merge 1 commit intopure-css:masterfrom
SelenIT:patch-1
Closed

Use Flexbox when browser @supports it unprefixed#377
SelenIT wants to merge 1 commit intopure-css:masterfrom
SelenIT:patch-1

Conversation

@SelenIT
Copy link

@SelenIT SelenIT commented Sep 5, 2014

Don't discriminate Firefox 28+ which supports Flexbox unprefixed (including flex-wrap). We can use unprefixed Flexbox as a main layout mechanism (for all modern browsers), prefixed Flexbox implementations as a fallback and inline-blocks as a last resort.

Don't discriminate Firefox 28+ which supports Flexbox unprefixed (including flex-wrap). We can use unprefixed Flexbox as a main layout mechanism (for all modern browsers), prefixed Flexbox implementations as a fallback and inline-blocks as a last resort.
@yahoocla
Copy link

yahoocla commented Sep 5, 2014

Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! 😄

@jamesalley
Copy link
Contributor

Good point here, it seems at first glance. Even though you don't have a CLA on file I may try to get this in to a future release. Thank you!

@paazmaya
Copy link
Contributor

@SelenIT could you try to acquire the CLA so that this could be merged?

@yahoocla
Copy link

CLA is valid!

@paazmaya
Copy link
Contributor

Well that was quick.
How about rerunning the tests for this PR?

@texxs
Copy link

texxs commented Nov 3, 2015

I know I'm in on this conversation late and I'm not a contributor, just a user. I have to say that I think using Flexbox in such a large role doesn't sound like a good idea. Supporting those who want to use it sure. But most Web Designers I know don't want to use it. Perhaps they don't know how to use it as well as others, but they all seem to feel it's too unpredictable. I have to agree. It's seems like a totally needed step in fact. I've tinkered with it. I've taken a class about "how to do everything with it" And even though I'm cranking out about 50 websites a year of various quality, I've still haven't found a place where I was like "hmmmm, flex box would be best here" . . .

Thanks for listening.

@SelenIT
Copy link
Author

SelenIT commented Nov 4, 2015

@texxs, the problem is that the Pure Grid system already uses Flexbox — but only for WebKit- and Blink-browsers, with -webkit- prefix. For all other browsers, it still uses inline-block-based solution with some ad-hoc trickery like letter-spacing: -.31em;, which hardly depends on many non-specified 'historic' browser behaviors, font settings etc., and definitely is more unpredictable than Flexbox (the reason that WebKit-browsers had to switch to it was, AFAIK, the change in their 'traditional' behavior that just broke the previous inline-block-based solution). It seems that similar changes occur in Firefox, too.

@lkraav
Copy link
Collaborator

lkraav commented Nov 4, 2015

Flexbox is the future. Browsers will get their ish together soon enough, so unprefixing it is the way to go. In the meanwhile, I will be forever grateful for Pure teaching me about inline-block, because it allowed me to drop float for good.

@paazmaya
Copy link
Contributor

paazmaya commented Nov 4, 2015

Tests at Travis seems to failing due to the ´@supports` usage.
Anything that could be done with that?

@texxs
Copy link

texxs commented Nov 4, 2015

Thanks SelenIT, I didn't know that. Devs did a good job of covering up all that unpredictability imo. But I don't get to use the Pure framework as much as I'd like too.

@lkraav
Copy link
Collaborator

lkraav commented Dec 12, 2015

https://github.com/10up/flexibility could take care of Internet Explorer 8 & 9 support.

@lkraav
Copy link
Collaborator

lkraav commented Feb 8, 2016

Problem with @supports is that its coverage is less than flat out supporting display: flex.

http://caniuse.com/#search=flex
Global 77.54% + 18.35% = 95.89%
unprefixed: 75.38% + 6.56% = 81.94%

http://caniuse.com/#search=%40supports
Global 70.17%

Notably things like all IE and iOS < 9 are missing for @supports

I think I would keep the prefixed flexbox and add unprefixed for the widest coverage.

EDIT this would make #351 the preferred option

@redonkulus
Copy link
Contributor

Replaced by #617

@redonkulus redonkulus closed this Dec 5, 2016
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.

7 participants