Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                container
  h2 Pre-Deployment Testing Status
  details
    summary.success UI Unit Tests
    ul
      li 
        div.success Test 1
          span.status succeeded
      li
        div.success Test 2
          span.status succeeded
  details
    summary.warning API Unit Tests
    ul
      li 
        div.success Test 1
          span.status succeeded
      li 
        div.warning Test 2
          span.status warning
          span.info info here about the warning status. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras imperdiet eros eu nisl maximus auctor. Aenean tempus ornare urna ultricies lacinia. Duis laoreet pharetra lectus eu maximus. Fusce ut ante convallis, placerat risus in, molestie diam. Nam vitae mollis massa, nec commodo purus
      li
        div.success Test 3
          span.status succeeded
  details(open)
    summary.failure DB Unit Tests
    ul
      li 
        div.success Test 1
          span.status succeeded
      li
        div.success Test 2
          span.status succeeded
      li 
        div.failure Test 3
          span.status failure
          span.info info here about the failure status. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras imperdiet eros eu nisl maximus auctor. Aenean tempus ornare urna ultricies lacinia. Duis laoreet pharetra lectus eu maximus. Fusce ut ante convallis, placerat risus in, molestie diam. Nam vitae mollis massa, nec commodo purus

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Nunito:400,700');



body{
  background: #edf5fa;
  margin:25px;
  font-family: 'Nunito', sans-serif;
}

container{
  display:block;
  width: 100%;
  max-width:800px;
  margin:auto;
  border-radius: 3px;
  position: relative;
  background:white;
  box-shadow: 10px 10px 100px 0 darken(#edf5fa,5);
}

h2{
  padding:20px;
  margin:0;
  border-bottom:1px solid rgba(black, 0.1);
  font-size:1.1em;
  
  &:after{
    content:'13 Feb 2019 12:02:0220 AM';
    float:right;
    font-size:0.9em;
    font-family:monospace;
    color:#aaa;
    line-height:1.5em;
  }
}

@mixin statuses(){
  &.success:before{
    color:#9cc320;
    content:"\f058";
  }

  &.warning:before{
    color:#ffa50a;
    content:"\f06a";
  }

  &.failure:before{
    color:#da281e;
    content:"\f057";
  }
}

details {
  width: 100%;
  overflow:hidden;
  border-bottom:1px solid rgba(black, 0.1);
  
  
  &:last-of-type{border-bottom:none}
  
  summary{
    display:block;
    user-select: none;
    outline:none;
    padding:20px;
    margin-bottom:0px;
    transition: all 600ms cubic-bezier(0.23, 1, 0.32, 1);
    transition-property: margin, background;
    font-weight:600;
    border-bottom:1px solid rgba(black, 0.1);
    
    &:last-of-type{border-bottom:none}

    &::-webkit-details-marker { display:none }
    
    &:before{
      font: normal normal normal 1em/1 FontAwesome;
      font-weight: 900;
      content:'';
      margin-right:0.5em;
    }

    &:hover{
      background:#f6f8fb;
      cursor:pointer;
    }
    
    @include statuses();
  }

  ul{
    padding:0;
    margin-left:1em;
    
    li{
      list-style:none;
      padding:1em 1em 1em 3em;
      font-weight:bold;
      position:relative;
      
      &:before{
        position:absolute;
        top:0;left:0;
        display:block;
        float:left;
        content:'';
        width:0em;
        height:1.5em;
        border-left:1px solid #ccc;
        border-bottom:1px solid #ccc;
      }
      
      &:after{
        position:absolute;
        top:0;left:0;
        display:block;
        float:left;
        content:'';
        width:1em;
        height:100%;
        border-left:1px solid #ccc;
      }
      
      &:last-child:after{display:none;}
      
      div{
        opacity:0;
        
        &:before{
          font: normal normal normal 1em/1 FontAwesome;
          font-weight: 900;
          position:absolute;
          top:1em;left:1em;
          padding:0 0.5em;
          display:block;
          float:left;
          content:"";
          width:1em;
          height:100%;
        }
        
        @include statuses();
      }
      
      span{
        display:block;
        font-size:0.9em;
        font-weight:normal;
        
        &:before{
          opacity:0.3;
          font-weight:bold;
        }
        
        &.status:before{content:'status: '}
        &.info:before{content:'info: '}
      }
    }
  }

  &[open] {
    summary{
      margin-bottom:20px;
      padding-bottom:20px;
      border-bottom:1px solid rgba(black, 0.1);
    }
    
    @for $i from 1 to 50 {
      summary ~ ul li:nth-child(#{$i}) div, summary ~ ul li:nth-child(#{$i}) div:before{
        animation: sweep .5s ease-in-out normal forwards;
        animation-delay: ($i - 1) * 0.1s;
      }
      
      summary ~ ul li:nth-child(#{$i}):before{
        animation: grow .5s ease-in-out normal forwards;
        animation-delay: $i * 0.1s;
      }
    }
    
    @keyframes sweep {
      0%    {opacity: 0; margin-left:-1em; margin-right:1em;}
      100%  {opacity: 1; margin-left:0; margin-right:0;}
    }
    
    @keyframes grow {
      0%    {width: 0}
      100%  {width: 1em}
    }
  }
}
              
            
!

JS

              
                //hint: hold shift while opening to keep more than 1 open
let ds= [...document.querySelectorAll('details')];
ds.forEach(d=>d.addEventListener('click',e=>e.shiftKey||ds.filter(i=>i!=d).forEach(i=>i.removeAttribute('open'))))
              
            
!
999px

Console