1

First I want to reference this other question, which doesn't quite answer my question. I'm working on a web project which only intends to support evergreen browsers. We're used to using bootstrap, but it seems like we're pulling in a lot of unnecessary CSS Rules given our support matrix.

Are there good/any reasons to use the CSS float property instead of flexbox properties? Is using the float property considered deprecated, for lack of a better word?

Community
  • 1
  • 1
bodine
  • 1,763
  • 4
  • 19
  • 28
  • If "evergreen" means what I think it means, then yes, by all means use float rather than flexbox. – Mr Lister Feb 28 '14 at 21:01
  • 2
    Can you wrap text around diferent sized blocks using flexbox ? – vals Feb 28 '14 at 21:47
  • @MrLister, "evergreen" was intended to be synonymous with "modern" in this case, and can I assume you meant use **flexbox** rather than **float**? – bodine Feb 28 '14 at 23:38
  • @vals, I don't think so, but I'll try to work up a fiddle and post it here. – bodine Feb 28 '14 at 23:39
  • @bodine Sorry, I didn't associate "evergreen" with "modern". In that case, the answer is that `float` still has its uses, e.g. for letting text flow around images; the things that `float` was designed for. – Mr Lister Mar 01 '14 at 04:37
  • @MrLister exactly what I said – vals Mar 01 '14 at 07:06

1 Answers1

0

To answer your question, float is still useful for its intended purpose: allowing content to wrap around an image or other element.

Some points to consider:

  • Jake Archibald claims that flexbox should not be used for page layout, due to the fact that content will be rearranged on the page during load on slow connections.
  • Chris Coyier points to some potential performance problems with too many elements with flexbox (though he is unable to replicate said problems)
  • Google Developers suggests using flexbox over older layout models
Ivan Durst
  • 1,163
  • 2
  • 12
  • 24