Want to share your CSS expertise with others? Apply to the MDN Fellowship by April 1! http://mzl.la/MDNFellowship

mozilla

Revision 300009 of flex-flow

  • Revision slug: CSS/flex-flow
  • Revision title: flex-flow
  • Revision id: 300009
  • Created:
  • Creator: ethertank
  • 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 grammar: <'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 { 
  flex-flow: column-reverse wrap;          /* Main-axis is the block direction with reversed main-start and main-end. Flex items are laid out in multiple lines */
}

Specifications

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

Browser compatibility

{{ page({path: "/en-US/docs/CSS/Using_CSS_flexible_boxes", section: "Browser compatibility"}) }}

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 grammar: &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>
element { 
  flex-flow: column-reverse wrap;          /* Main-axis is the block direction with reversed main-start and main-end. Flex items are laid out in multiple lines */
}
</pre>


<h2 id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr style="background-color: rgb(255, 204, 255);">
      <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>{{ page({path: "/en-US/docs/CSS/Using_CSS_flexible_boxes", section: "Browser compatibility"}) }}</p>


<h2 id="See_also">See also</h2>
<p>---</p>
Revert to this revision