From 3100ea07bb05d3fe4ddd98a6529f3232e20a5881 Mon Sep 17 00:00:00 2001 From: SelenIT Date: Sat, 6 Sep 2014 02:36:06 +0300 Subject: [PATCH] Use Flexbox when browser @supports it unprefixed 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. --- src/grids/css/grids-core.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/grids/css/grids-core.css b/src/grids/css/grids-core.css index d2fee4537..d51da7eb0 100644 --- a/src/grids/css/grids-core.css +++ b/src/grids/css/grids-core.css @@ -39,6 +39,16 @@ -ms-flex-flow: row wrap; } +/* Firefox as of 28 supports Flexbox (including flex-wrap) unprefixed. + Use unprefixed flexbox when possible with inline-blocks/prefixed flexbox as a fallback. +*/ +@supports(flex-flow: row wrap) { + .pure-g { + display: flex; + flex-flow: row wrap; + } +} + /* Opera as of 12 on Windows needs word-spacing. The ".opera-only" selector is used to prevent actual prefocus styling and is not required in markup.