• Revision slug: CSS/flex-shrink
  • Revision title: flex-shrink
  • Revision id: 7440
  • Created:
  • Creator: FredB
  • Is current revision? No
  • Comment 11 words removed

Revision Content

{{ CSSRef() }}

{{ SeeCompatTable() }}


The flex-shrink CSS property specifies the flex shrink ratio of a flex item.

  • {{ Xref_cssinitial() }}:1
  • Applies to: flex items
  • {{ Xref_cssinherited() }}: no
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: as specified

See Using CSS flexible boxes for more properties and information.


Formal grammar: <number>

flex-shrink: value


See {{ Xref_cssnumber() }}. Negative values are invalid.


element { 
  flex-grow: 3;


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

Browser compatibility

{{ page{path: "/en/CSS/Using_CSS_flexible_boxes", section: "Browser compatibility"} }}

See also

Revision Source

<p>{{ CSSRef() }}</p>
<p>{{ SeeCompatTable() }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>flex-shrink</code> <a href="/en/CSS" title="CSS">CSS</a> property specifies the flex shrink ratio of a flex item.</p> <ul class="cssprop"> <li><dfn>{{ Xref_cssinitial() }}:</dfn><code>1</code></li> <li><dfn>Applies to:</dfn> flex items</li> <li><dfn>{{ Xref_cssinherited() }}:</dfn> no</li> <li><dfn>Media:</dfn> {{ Xref_cssvisual() }}</li> <li><dfn>{{ Xref_csscomputed() }}:</dfn> as specified</li>
<p>See <a href="/en/CSS/Using_CSS_flexible_boxes" title="/en/CSS/Using_CSS_flexible_boxes">Using CSS flexible boxes</a> for more properties and information.</p><h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox"><nobr>Formal grammar: &lt;number&gt;
<nobr> </nobr>
<pre><nobr>flex-shrink: <em>value</em>
<h3 id="Values">Values</h3>
<dl> <dt><code>number</code></dt> <dd>See {{ Xref_cssnumber() }}. Negative values are invalid.</dd>
<h2 id="Examples">Examples</h2>
<pre>element { 
  flex-grow: 3;
<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-shrink" title="http://dev.w3.org/csswg/css3-flexbox/#flex-shrink">CSS Flexible Box Layout Module</a></td> <td>{{ Spec2('CSS3 Flexbox') }}</td> <td> </td> </tr> </tbody>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ page{path: "/en/CSS/Using_CSS_flexible_boxes", section: "Browser compatibility"} }}</p><h2 id="See_also">See also</h2>
Revert to this revision