mozilla

Revision 317097 of flex-flow

  • Revision slug: CSS/flex-flow
  • Revision title: flex-flow
  • Revision id: 317097
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}
{{ SeeCompatTable() }}

Summary

The flex-flow CSS property is a shorthand property for flex-direction and flex-wrap individual properties.

  • {{ Xref_cssinitial() }} see individual properties
  • Applies to flex containers
  • {{ Xref_cssinherited() }} see individual properties
  • Media {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }} as specified for each individual property

See Using CSS flexible boxes for more properties and information.

Syntax

Formal syntax: <'flex-direction'> || <'flex-wrap'> 
                where <'flex-direction'> and <'flex-wrap'> values are those of the corresponding individual properties
flex-flow: row | row-reverse | column | column-reverse || nowrap | wrap | wrap-reverse

Values

See flex-direction and flex-wrap for details on the values.

Examples

element { 
  /* Main-axis is the block direction with reversed main-start and main-end. Flex items are laid out in multiple lines */
  flex-flow: column-reverse wrap;            
}

Specifications

Specification Status Comment
CSS Flexible Box Layout Module {{ Spec2('CSS3 Flexbox') }}  

Browser compatibility

{{ CompatibilityTable() }}

Feature Firefox (Gecko) Chrome Internet Explorer Opera Safari
Basic support {{ CompatGeckoDesktop("18.0") }} (behind a pref) 21.0{{ property_prefix("-webkit") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Firefox Mobile (Gecko) Android IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}

See also

Revision Source

<div>
  {{ CSSRef() }}</div>
<div>
  {{ SeeCompatTable() }}</div>
<h2 id="Summary">Summary</h2>
<p>The <code>flex-flow</code> <a href="/en-US/docs/CSS" title="CSS">CSS</a> property is a shorthand property for <code>flex-direction</code> and <code>flex-wrap</code> individual properties.</p>
<ul class="cssprop">
  <li><dfn>{{ Xref_cssinitial() }}</dfn> see individual properties</li>
  <li><dfn>Applies to</dfn> flex containers</li>
  <li><dfn>{{ Xref_cssinherited() }}</dfn> see individual properties</li>
  <li><dfn>Media</dfn> {{ Xref_cssvisual() }}</li>
  <li><dfn>{{ Xref_csscomputed() }}</dfn> as specified for each individual property</li>
</ul>
<p>See <a href="/en-US/docs/CSS/Using_CSS_flexible_boxes" title="/en-US/docs/CSS/Using_CSS_flexible_boxes">Using CSS flexible boxes</a> for more properties and information.</p>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
Formal syntax: &lt;'flex-direction'&gt; || &lt;'flex-wrap'&gt; 
                where &lt;'flex-direction'&gt; and &lt;'flex-wrap'&gt; values are those of the corresponding individual properties</pre>
<pre>
flex-flow: <em>row | row-reverse | column | column-reverse || nowrap | wrap | wrap-reverse</em></pre>
<h3 id="Values">Values</h3>
<p>See <a href="/en-US/docs/CSS/flex-direction" title="en-US/docs/CSS/flex-direction"><code>flex-direction</code></a> and <a href="/en-US/docs/CSS/flex-wrap" title="flex-wrap"><code>flex-wrap</code></a> for details on the values.</p>
<h2 id="Examples">Examples</h2>
<pre class="brush:css;highlight:3">
element { 
  /* Main-axis is the block direction with reversed main-start and main-end. Flex items are laid out in multiple lines */
  flex-flow: column-reverse wrap;            
}
</pre>
<h2 id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="external" href="http://dev.w3.org/csswg/css3-flexbox/#flex-flow" title="http://dev.w3.org/csswg/css3-flexbox/#flex-flow">CSS Flexible Box Layout Module</a></td>
      <td>{{ Spec2('CSS3 Flexbox') }}</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Firefox (Gecko)</th>
        <th>Chrome</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatGeckoDesktop("18.0") }} (behind a pref)</td>
        <td>21.0{{ property_prefix("-webkit") }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>Android</th>
        <th>IE&nbsp;Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
        <td>{{ CompatNo() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="/en-US/docs/CSS/Using_CSS_flexible_boxes" title="/en-US/docs/CSS/Using_CSS_flexible_boxes">Using CSS flexible boxes</a></li>
  <li>{{ CSS_Reference:FlexBox() }}</li>
</ul>
Revert to this revision