cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <header>
  <h1 id="main-title">Flexbox Cheat Sheet</h1>
  <h2 id="sub-title">A simple set of examples to help remember Flexbox properties.</h2>
</header>
<section class="section-container" id="intro">
  <h3 class="section-title">0. Intro to Flexbox</h3>
  <p class="section-text">Flexbox is a module added to CSS3 that allows for easier management of arranging items. In order to take advantage of these properties, each element must have the property <span class="code-css">display: flex;</span>.</p>
  <p class="section-text">Once <span class="code-css">display: flex;</span> is used on an element, it may then use the following Flexbox properties:</p>
  <nav id="section-nav">
    <a class="nav-link" href="#flex-directon">flex-direction</a>
    <a class="nav-link" href="#justify-content">justify-content</a>
    <a class="nav-link" href="#align-items">align-items</a>
    <a class="nav-link" href="#flex-wrap">flex-wrap</a>
    <a class="nav-link" href="#flex-shrink">flex-shrink</a>
    <a class="nav-link" href="#flex-grow">flex-grow</a>
    <a class="nav-link" href="#flex-basis">flex-basis</a>
    <a class="nav-link" href="#align-self">align-self</a>
  </nav>
</section>
<section class="section-container" id="flex-direction">
  <h3 class="section-title">1. Flex Direction</h3>
  <p class="section-text">When used on a parent element, <span class="code-css">flex-direction</span> sets the "direction" of the child elements. The options for <span class="code-css">flex-direction</span> are <span class="code-css">row</span>, <span class="code-css">row-reverse</span>, <span class="code-css">column</span>, and <span class="code-css">column-reverse</span> and each results in the following layouts:</p>
  <h4 class="example-heading">1.1 <span class="code-css">flow-direction: row;</span></h4>
  <div class="example-container" id="flex-direction-row">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">1.2 <span class="code-css">flow-direction: row-reverse;</span></h4>
  <div class="example-container" id="flex-direction-row-reverse">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">1.3 <span class="code-css">flow-direction: column;</span></h4>
  <div class="example-container" id="flex-direction-column">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">1.4 <span class="code-css">flow-direction: column-reverse;</span></h4>
  <div class="example-container" id="flex-direction-column-reverse">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <p class="section-text">The default value is <span class="code-css">flex-direciton: row;</span>.</p>
</section>
<section class="section-container" id="justify-content">
  <h3 class="section-title">2. Justify Content</h3>
  <p class="section-text">When used on a parent element, <span class="code-css">justify-content</span> sets the spacing of the child elements along the main axis which is dictated by the <span class="code-css">flex-direction</span> property. The options for <span class="code-css">justify-content</span> are <span class="code-css">flex-start</span>, <span class="code-css">flex-end</span>, <span class="code-css">center</span>, <span class="code-css">space-between</span>, <span class="code-css">space-around</span>, and <span class="code-css">space-evenly</span> and each results in the following layouts (when defaults for other properties are used):</p>
  <h4 class="example-heading">2.1 <span class="code-css">justify-content: flex-start;</span></h4>
  <div class="example-container" id="justify-content-flex-start">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">2.2 <span class="code-css">justify-content: flex-end;</span></h4>
  <div class="example-container" id="justify-content-flex-end">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">2.3 <span class="code-css">justify-content: center;</span></h4>
  <div class="example-container" id="justify-content-center">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">2.4 <span class="code-css">justify-content: space-between;</span></h4>
  <div class="example-container" id="justify-content-space-between">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">2.5 <span class="code-css">justify-content: space-around;</span></h4>
  <div class="example-container" id="justify-content-space-around">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">2.6 <span class="code-css">justify-content: space-evenly;</span></h4>
  <div class="example-container" id="justify-content-space-evenly">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <p class="section-text">The default value is <span class="code-css">justify-content: flex-start;</span>.</p>
</section>
<section class="section-container" id="align-items">
  <h3 class="section-title">3. Align Items</h3>
  <p class="section-text">When used on a parent element, <span class="code-css">align-items</span> sets the alignment of the child elements along the cross axis which is dictated by the <span class="code-css">flex-direction</span> property. The options for <span class="code-css">align-items</span> are <span class="code-css">flex-start</span>, <span class="code-css">flex-end</span>, <span class="code-css">center</span>, <span class="code-css">baseline</span>, and <span class="code-css">stretch</span> and each results in the following layouts (when defaults for other properties are used):</p>
  <h4 class="example-heading">3.1 <span class="code-css">align-items: flex-start;</span></h4>
  <div class="example-container" id="align-items-flex-start">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">3.2 <span class="code-css">align-items: flex-end;</span></h4>
  <div class="example-container" id="align-items-flex-end">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">3.3 <span class="code-css">align-items: center;</span></h4>
  <div class="example-container" id="align-items-center">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">3.4 <span class="code-css">align-items: baseline;</span></h4>
  <div class="example-container" id="align-items-baseline">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">3.5 <span class="code-css">align-items: stretch;</span></h4>
  <div class="example-container" id="align-items-stretch">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <p class="section-text">The default value is <span class="code-css">align-items: flex-start;</span>.</p>
</section>
<section class="section-container" id="flex-wrap">
  <h3 class="section-title">4. Flex Wrap</h3>
  <p class="section-text">When used on a parent element, <span class="code-css">flex-wrap</span> sets if and how the child elements will wrap upon running out of space. The options for <span class="code-css">flex-wrap</span> are <span class="code-css">nowrap</span>, <span class="code-css">wrap</span>, and <span class="code-css">wrap-wreverse</span> and each results in the following layouts (when defaults for other properties are used):</p>
  <h4 class="example-heading">4.1 <span class="code-css">flex-wrap: nowrap;</span></h4>
  <div class="example-container" id="flex-wrap-nowrap">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">4.2 <span class="code-css">flex-wrap: wrap;</span></h4>
  <div class="example-container" id="flex-wrap-wrap">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <h4 class="example-heading">4.3 <span class="code-css">flex-wrap: wrap-reverse;</span></h4>
  <div class="example-container" id="flex-wrap-wrap-reverse">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
    <div class="example-item">4</div>
  </div>
  <p class="section-text">The default value is <span class="code-css">flex-wrap: wrap;</span>.</p>
</section>
<section class="section-container" id="flex-shrink">
  <h3 class="section-title">5. Flex Shrink</h3>
  <p class="section-text">When used on a child element, <span class="code-css">flex-shink</span> sets the ratio at which the element(s) shrink relative to other child elements. <span class="code-css">flex-shrink</span> takes an integer as the value and each results in the following layouts (when defaults for other properties are used):</p>
  <h4 class="example-heading">5.1 <span class="code-css">flex-shink: 1;</span></h4>
  <div class="example-container" id="flex-shrink-1">
    <div class="example-item">1</div>
    <div class="example-item">1</div>
    <div class="example-item">1</div>
  </div>
  <h4 class="example-heading">5.2 <span class="code-css">flex-shrink: 1 & 2;</span></h4>
  <div class="example-container" id="flex-shrink-2">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">1</div>
  </div>
  <h4 class="example-heading">5.3 <span class="code-css">flex-shrink: 1 & 2 & 3;</span></h4>
  <div class="example-container" id="flex-shrink-3">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
  </div>
  <p class="section-text">The default value is <span class="code-css">flex-shrink: 1;</span>.</p>
</section>
<section class="section-container" id="flex-grow">
  <h3 class="section-title">6. Flex Grow</h3>
  <p class="section-text">When used on a child element, <span class="code-css">flex-grow</span> sets the ratio at which the element(s) grow relative to other child elements. <span class="code-css">flex-grow</span> takes an integer as the value and each results in the following layouts (when defaults for other properties are used):</p>
  <h4 class="example-heading">6.1 <span class="code-css">flex-grow: 1;</span></h4>
  <div class="example-container" id="flex-grow-1">
    <div class="example-item">1</div>
    <div class="example-item">1</div>
    <div class="example-item">1</div>
  </div>
  <h4 class="example-heading">6.2 <span class="code-css">flex-grow: 1 & 2;</span></h4>
  <div class="example-container" id="flex-grow-2">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">1</div>
  </div>
  <h4 class="example-heading">6.3 <span class="code-css">flex-grow: 1 & 2 & 3;</span></h4>
  <div class="example-container" id="flex-grow-3">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">3</div>
  </div>
  <p class="section-text">The default value is <span class="code-css">flex-grow: 1;</span>.</p>
</section>
<section class="section-container" id="flex-basis">
  <h3 class="section-title">7. Flex Basis</h3>
  <p class="section-text">When used on a child element, <span class="code-css">flex-basis</span> sets how the width of the child elements are distributed. <span class="code-css">flex-basis</span> can take a length value or auto and each results in the following layouts (when defaults for other properties are used):</p>
  <h4 class="example-heading">7.1 <span class="code-css">flex-basis: 75px;</span></h4>
  <div class="example-container" id="flex-basis-20">
    <div class="example-item">75px</div>
    <div class="example-item">75px</div>
    <div class="example-item">75px</div>
  </div>
  <h4 class="example-heading">7.2 <span class="code-css">flex-basis: 75px & 150px;</span></h4>
  <div class="example-container" id="flex-basis-20-40">
    <div class="example-item">75px</div>
    <div class="example-item">150px</div>
    <div class="example-item">75px</div>
  </div>
  <h4 class="example-heading">7.3 <span class="code-css">flex-basis: 0;</span></h4>
  <div class="example-container" id="flex-basis-0">
    <div class="example-item">1</div>
    <div class="example-item">1000</div>
    <div class="example-item">1000000</div>
  </div>
  <p class="section-text">* Distributes the total width based on <span class="code-css">flex-grow</span>.</p>
  <h4 class="example-heading">7.4 <span class="code-css">flex-basis: auto;</span></h4>
  <div class="example-container" id="flex-basis-auto">
    <div class="example-item">1</div>
    <div class="example-item">1000</div>
    <div class="example-item">1000000</div>
  </div>
  <p class="section-text">* Distributes the extra space based on <span class="code-css">flex-grow</span>.</p>
  <p class="section-text">The default value is <span class="code-css">flex-basis: auto;</span>.</p>
</section>
<section class="section-container" id="align-self">
  <h3 class="section-title">8. Align Self</h3>
  <p class="section-text">When used on a child element, <span class="code-css">align-self</span> sets the alignment of the child element along the cross axis which is dictated by the <span class="code-css">flex-direction</span> property of the parent element. The options for <span class="code-css">align-self</span> are <span class="code-css">flex-start</span>, <span class="code-css">flex-end</span>, <span class="code-css">center</span>, <span class="code-css">baseline</span>, and <span class="code-css">stretch</span> and each results in the following layouts (when defaults for other properties are used):</p>
  <h4 class="example-heading">8.1 <span class="code-css">align-self: flex-start;</span></h4>
  <div class="example-container" id="align-self-flex-start">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">1</div>
    <div class="example-item">1</div>
  </div>
  <h4 class="example-heading">8.2 <span class="code-css">align-self: flex-end;</span></h4>
  <div class="example-container" id="align-self-flex-end">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">1</div>
    <div class="example-item">1</div>
  </div>
  <h4 class="example-heading">8.3 <span class="code-css">align-self: center;</span></h4>
  <div class="example-container" id="align-self-center">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">1</div>
    <div class="example-item">1</div>
  </div>
  <h4 class="example-heading">8.4 <span class="code-css">align-self: baseline;</span></h4>
  <div class="example-container" id="align-self-baseline">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">1</div>
    <div class="example-item">1</div>
  </div>
  <h4 class="example-heading">8.5 <span class="code-css">align-self: stretch;</span></h4>
  <div class="example-container" id="align-self-stretch">
    <div class="example-item">1</div>
    <div class="example-item">2</div>
    <div class="example-item">1</div>
    <div class="example-item">1</div>
  </div>
  <p class="section-text">The default value is <span class="code-css">align-self: flex-start;</span>.</p>
</section>
<footer>
  <p>Design and Developed by <a href="https://www.jacobvarner.com" class="footer-link">Jacob Varner</a>. If you notice any errors, please let me know <a href="https://www.twitter.com/jacobvarner14" class="footer-link">on Twitter</a>.</p>
</footer>
            
          
!
            
              $heading: 'Patua One', cursive;
$text: 'Ubuntu', sans-serif;
$code: 'Ubuntu Mono', monospace;
$heading-color: #0500c6;
$link-color: #0500c6;
$text-color: #222222;

body {
  background: linear-gradient(#eeeeee, #cccccc, #555555);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px 10px;
  
  h1#main-title {
    font-family: $heading;
    font-size: 60px;
    margin: 0;
    line-height: 60px;
    color: $heading-color;
    text-align: center;
  }
  
  h2#sub-title {
    font-family: $heading;
    font-size: 30px;
    margin: 20px 0;
    line-height: 30px;
    color: $text-color;
    text-align: center;
  }
}

section.section-container {
  display: block;
  max-width: 800px;
  padding: 30px 40px;
  margin: 10px;
  background: white;
  border-radius: 5px;
  box-shadow: 0 2px 10px 0px rgba(0,0,0,0.5);
  border-bottom: 8px solid $heading-color;
  
  h3.section-title {
    font-family: $heading;
    font-size: 30px;
    margin: 0;
    color: $heading-color;
  }
  
  p.section-text {
    font-family: $text;
    font-size: 16px;
    color: $text-color;
    line-height: 30px;
    margin: 16px 0;
  }
  
  span.code-css {
    font-family: $code;
    font-size: 16px;
    color: black;
    background: #dddddd;
    padding: 4px;
    border-radius: 4px;
    font-weight: 900;
    line-height: 24px;
  }
  
  nav#section-nav {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin: 8px 0 0;
    
    a.nav-link, a.nav-link:active, a.nav-link:visited {
      text-decoration: none;
      margin: 0 16px 16px 0;
      padding: 8px;
      background: $link-color;
      color: white;
      border-radius: 5px;
      font-family: $code;
    }
    
    a.nav-link:hover {
      transform: rotate(5deg);
    }
  }
  
  h4.example-heading {
    font-family: $heading;
    font-size: 20px;
    color: $heading-color;
  }
  
  div.example-container {
    display: flex;
    width: 100%;
    border: 4px solid blue;
    
    div.example-item {
      font-size: 30px;
      font-weight: bold;
      font-family: $text;
      color: white;
      text-align: center;
      padding: 4px 16px;
    }
    
    div.example-item:nth-child(1) {
      background: #111111;
    }
    
    div.example-item:nth-child(2) {
      background: #444444;
    }
    
    div.example-item:nth-child(3) {
      background: #777777;
    }
    
    div.example-item:nth-child(4) {
      background: #aaaaaa;
    }
  }
  
  div#flex-direction-row {
    flex-direction: row;
  }
  
  div#flex-direction-row-reverse {
    flex-direction: row-reverse;
  }
  
  div#flex-direction-column {
    flex-direction: column;
  }
  
  div#flex-direction-column-reverse {
    flex-direction: column-reverse;
  }
  
  div#justify-content-flex-start {
    justify-content: flex-start;
  }
  
  div#justify-content-flex-end {
    justify-content: flex-end;
  }
  
  div#justify-content-center {
    justify-content: center;
  }
  
  div#justify-content-space-between {
    justify-content: space-between;
  }
  
  div#justify-content-space-around {
    justify-content: space-around;
  }
  
  div#justify-content-space-evenly {
    justify-content: space-evenly;
  }
  
  div#align-items-flex-start {
    align-items: flex-start;
    
    div.example-item:nth-child(1) {
      height: 40px;
      line-height: 40px;
    }
    div.example-item:nth-child(2) {
      height: 50px;
      line-height: 50px;
    }
    div.example-item:nth-child(3) {
      height: 60px;
      line-height: 60px;
    }
    div.example-item:nth-child(4) {
      height: 70px;
      line-height: 70px;
    }
  }
  
  div#align-items-flex-end {
    align-items: flex-end;
    
    div.example-item:nth-child(1) {
      height: 40px;
      line-height: 40px;
    }
    div.example-item:nth-child(2) {
      height: 50px;
      line-height: 50px;
    }
    div.example-item:nth-child(3) {
      height: 60px;
      line-height: 60px;
    }
    div.example-item:nth-child(4) {
      height: 70px;
      line-height: 70px;
    }
  }
  
  div#align-items-center {
    align-items: center;
    
    div.example-item:nth-child(1) {
      height: 40px;
      line-height: 40px;
    }
    div.example-item:nth-child(2) {
      height: 50px;
      line-height: 50px;
    }
    div.example-item:nth-child(3) {
      height: 60px;
      line-height: 60px;
    }
    div.example-item:nth-child(4) {
      height: 70px;
      line-height: 70px;
    }
  }
  
  div#align-items-baseline {
    align-items: baseline;
    
    div.example-item:nth-child(1) {
      height: 40px;
      line-height: 20px;
    }
    div.example-item:nth-child(2) {
      height: 50px;
      line-height: 30px;
    }
    div.example-item:nth-child(3) {
      height: 60px;
      line-height: 40px;
    }
    div.example-item:nth-child(4) {
      height: 70px;
      line-height: 50px
    }
  }
  
  div#align-items-stretch {
    align-items: stretch;
    height: 60px;
  }
  
  div#flex-wrap-wrap {
    flex-wrap: wrap;
    width: 250px;
    
    div.example-item {
      width: 75px;
      padding: 4px 0;
    }
  }
  
  div#flex-wrap-nowrap {
    flex-wrap: nowrap;
    width: 250px;
    
    div.example-item {
      width: 100px;
      padding: 4px 0;
    }
  }
  
  div#flex-wrap-wrap-reverse {
    flex-wrap: wrap-reverse;
    width: 250px;
    
    div.example-item {
      width: 74px;
      padding: 4px 0;
    }
  }
  
  div#flex-shrink-1 {
    div.example-item {
      flex-shrink: 1;
      width: 100%;
      padding: 4px 16px;
    }
  }
  
  div#flex-shrink-2 {
    div.example-item {
      flex-shrink: 1;
      width: 100%;
      padding: 4px 16px;
    }
    
    div.example-item:nth-child(2) {
      flex-shrink: 2;
      width: 100%;
      padding: 4px 16px;
    }
  }
  
  div#flex-shrink-3 {
    div.example-item {
      flex-shrink: 1;
      width: 100%;
      padding: 4px 16px;
    }
    
    div.example-item:nth-child(2) {
      flex-shrink: 2;
      width: 100%;
      padding: 4px 16px;
    }
    
    div.example-item:nth-child(3) {
      flex-shrink: 3;
      width: 100%;
      padding: 4px 16px;
    }
  }
  
  div#flex-grow-1 {
    div.example-item {
      flex-grow: 1;
      padding: 4px 16px;
    }
  }
  
  div#flex-grow-2 {
    div.example-item {
      flex-grow: 1;
      padding: 4px 16px;
    }
    
    div.example-item:nth-child(2) {
      flex-grow: 2;
      padding: 4px 16px;
    }
  }
  
  div#flex-grow-3 {
    div.example-item {
      flex-grow: 1;
      padding: 4px 16px;
    }
    
    div.example-item:nth-child(2) {
      flex-grow: 2;
      padding: 4px 16px;
    }
    
    div.example-item:nth-child(3) {
      flex-grow: 3;
      padding: 4px 16px;
    }
  }
  
  div#flex-basis-20 {
    div.example-item {
      flex-basis: 75px;
    }
  }
  
  div#flex-basis-20-40 {
    div.example-item {
      flex-basis: 75px;
    }
    
    div.example-item:nth-child(2) {
      flex-basis: 150px;
    }
  }
  
  div#flex-basis-0 {
    div.example-item {
      flex-basis: 0;
      flex-grow: 1;
    }
  }
  
  div#flex-basis-auto {
    div.example-item {
      flex-basis: auto;
      flex-grow: 1;
    }
  }
  
  div#align-self-flex-start {
    
    div.example-item:nth-child(1) {
      height: 40px;
      line-height: 40px;
    }
    div.example-item:nth-child(2) {
      height: 50px;
      line-height: 50px;
      align-self: flex-start;
    }
    div.example-item:nth-child(3) {
      height: 60px;
      line-height: 60px;
    }
    div.example-item:nth-child(4) {
      height: 70px;
      line-height: 70px;
    }
  }
  
  div#align-self-flex-end {
    
    div.example-item:nth-child(1) {
      height: 40px;
      line-height: 40px;
    }
    div.example-item:nth-child(2) {
      height: 50px;
      line-height: 50px;
      align-self: flex-end;
    }
    div.example-item:nth-child(3) {
      height: 60px;
      line-height: 60px;
    }
    div.example-item:nth-child(4) {
      height: 70px;
      line-height: 70px;
    }
  }
  
  div#align-self-center {
    
    div.example-item:nth-child(1) {
      height: 40px;
      line-height: 40px;
    }
    div.example-item:nth-child(2) {
      height: 50px;
      line-height: 50px;
      align-self: center;
    }
    div.example-item:nth-child(3) {
      height: 60px;
      line-height: 60px;
    }
    div.example-item:nth-child(4) {
      height: 70px;
      line-height: 70px;
    }
  }
  
  div#align-self-baseline {
    
    div.example-item {
      height: 60px;
    }
    div.example-item:nth-child(2) {
      height: 40px;
      align-self: baseline;
    }
  }
  
  div#align-self-stretch {
    height: 60px;
    
    div.example-item {
      align-self: flex-start;
    }
    
    div.example-item:nth-child(2) {
      align-self: stretch;
    }
  }
}

footer {
  text-align: center;
  margin: 30px 0;
  
  p {
    font-family: $text;
    color: white;
    
    a.footer-link, a.footer-link:active, a.footer-link:visited {
      text-decoration: none;
      margin: 0 0 0 4px;
      padding: 8px;
      background: $link-color;
      color: white;
      border-radius: 5px;
      font-family: $text;
    }
  }
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console