Giter Site home page Giter Site logo

Comments (7)

hexalys avatar hexalys commented on June 10, 2024

I actually now resolved this by applying '-webkit-box-flex' with an css :not() selector with something like this:

.Grid > .Grid-cell:not(.u-1of3){
-webkit-box-flex: 1;/* Safari 3-6*/
}

That way, Safari respect the u-xofx width (as per your syntax), without applying the flexbox model to those boxes, and withouth the need to use 'none !important' or '!important' in those rules.
Something you could probably keep in mind to make the css cleaner and preserve Safari compatibility.

from solved-by-flexbox.

hexalys avatar hexalys commented on June 10, 2024

Actually, it turns out your demo is missing the display: -webkit-box; necessary for Safari. That's all there is to it... I got confused there because of it.

You need to add support for the old 2009 model with:
display: -webkit-box;
display: -moz-box;

from solved-by-flexbox.

philipwalton avatar philipwalton commented on June 10, 2024

These properties should be added by autoprefixer, and as far as I can tell, they are. Which specific components are you not seeing them on?

from solved-by-flexbox.

hexalys avatar hexalys commented on June 10, 2024

That's theoretically in the autoprefixer specs AFAIK too. Though your demo site http://philipwalton.github.io/ does not have them, and the site displays the warning: "Your browser does not support Flexbox. Parts of this site may not appear as expected." when browsing with Safari 5.1 or 6. So there is an issue somewhere.

from solved-by-flexbox.

philipwalton avatar philipwalton commented on June 10, 2024

The flexbox detection logic simply checks for the presence of the property flex or webkit-flex so that explains why it doesn't work in Safari 5.1 and 6.0. This is what I want because the older box syntax doesn't quite do everything needed for these demos.

If you're seeing something I could add to make it work in older Safari let me know, although I think this is much less of an issue now that Safari 6.1 and 7.0 have been released, which fully support the newest spec.

from solved-by-flexbox.

hexalys avatar hexalys commented on June 10, 2024

It's okay for the context of your showcase I guess. Though IMO autoprefixer should be adding it and saying the Flexbox support is only 'partial', instead of saying it's not supported...

I am working on a 'ready to use' framework with a different approach here, including what the 'box' syntax can handle, for backward compatibility. So in my case, I really need it. I am just using your showcase as a side reference.

from solved-by-flexbox.

philipwalton avatar philipwalton commented on June 10, 2024

As far as I can tell autoprefixer is adding it. Unless you can point me to an instance where it's not.

The alert saying flexbox isn't supported is something I'm doing and has nothing to do with autoprefixer. I suppose I could update the alert to say flexbox is only partially supported in those browsers. Maybe I'll do that if I detect support for box or ms-flexbox.

from solved-by-flexbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.