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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <div class="main">
  <div class="main__stream">
    <div class="main__stream__content">This is some random text that will go into the first item of the first stream.</div>
    <div class="main__stream__content">This is some random text that will go into the second item of the first stream. This one will be longer, just to see how everything scales when we have longer content to account for.</div>
    <div class="main__stream__content">This is a much shorter block of text.</div>
  </div>
  <div class="main__stream">
    <div class="main__stream__content">The second stream has four items.</div>
    <div class="main__stream__content">They will have shorter blocks of text.</div>
    <div class="main__stream__content">However, the third block of text in the second stream will be longer than the other items in this stream, just to make it look interesting.</div>
    <div class="main__stream__content">This is the shortest.</div>
  </div>
  <div class="main__stream">
    <div class="main__stream__content">Since there are only two items in this last stream, I will add more text to it to give it more length. It will be longer than the other posts, especially the short posts in the second stream which contained the shortest text blocks. The third block was an exception.</div>
    <div class="main__stream__content">Since I already have one long item in this stream, I will end off with a shorter item.</div>
  </div>
</div>
            
          
!
            
              $border-radius: 10px;
$default-spacing: 10px;
$small-screen: 400px;

.main {
  // notable properties
  display: flex;
  flex-direction: row;
  
  // other styling properties
  width: 100%;
  height: 100%;
  
  &__stream {
    // notable properties
    flex: 0 1 auto; // default
    
    // other styling properties
    width: 100%;
    height: 100%;
    border: 1px solid white;
    padding-left: $default-spacing;

    &__content {
      // other styling properties
      color: #333;
      font-family: sans-serif;
      font-size: 14px;
      line-height: 1.25;
      padding: $default-spacing;
      background-color: #EEE;
      border-radius: $border-radius;
      margin-bottom: $default-spacing;
    }
    &:last-child {
      // hide last stream on smaller screens
      @media screen and (max-width: $small-screen) {
        display: none;
      }
    }
  }
}
            
          
!
999px
Loading ..................

Console