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 includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                <div class="details-block">
  <details open>
    <summary>Lorem ipsum</summary>
    <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a ante lectus. Nam fringilla sagittis sodales. Nam purus nibh, semper sit amet hendrerit non, lacinia quis augue. Ut egestas, lectus vitae eleifend elementum, arcu magna scelerisque mi, a pulvinar orci libero et augue. Nulla laoreet ante ut felis condimentum, eu pulvinar mauris mattis. Integer tincidunt sem non ligula convallis pellentesque maximus nec mauris. Mauris sed condimentum metus, vitae maximus nisl. Ut massa magna, pretium in hendrerit eu, rutrum blandit eros. Sed condimentum lectus vitae vulputate molestie.</div>
  </details>
  <details>
    <summary>Dolor sit amet</summary>
    <div>Donec aliquet consequat augue, nec tempor ex rutrum sit amet. Aliquam augue orci, sollicitudin ac imperdiet quis, scelerisque id eros. Morbi nec accumsan metus, in dapibus justo. Fusce nec neque orci. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus gravida, felis at feugiat feugiat, dolor justo consequat purus, elementum fringilla tortor erat sed nisl. Etiam blandit accumsan orci a malesuada. Ut imperdiet ac lorem vitae euismod. Nam vitae dolor eget justo congue feugiat. Etiam id enim nibh. Phasellus vitae nulla ultricies, rutrum ex vitae, varius augue. Proin placerat purus a quam hendrerit vestibulum nec eu felis. Aenean aliquam vehicula congue. Aliquam erat volutpat. Aliquam accumsan elit ac gravida ultrices. In dictum felis finibus rutrum faucibus.
    </div>
  </details>
  <details>
    <summary>Consectetur adipiscing elit</summary>
    <div>Suspendisse feugiat convallis velit, fringilla gravida nunc consectetur nec. Phasellus nunc nunc, sagittis in risus in, pretium consectetur velit. Etiam ut ultricies odio. Suspendisse molestie, tellus vel dictum luctus, velit quam ornare diam, ut pharetra nisl metus eu lectus. Pellentesque eget consectetur sem. Maecenas auctor suscipit tristique. Aenean at pulvinar nibh. Mauris vel mollis dui. Etiam gravida, tellus congue dignissim porttitor, dui nisl maximus mauris, id suscipit sapien elit dignissim mi. Sed hendrerit pharetra lacus, ut tincidunt justo maximus ut. Phasellus vel neque dictum nunc lacinia consequat. Morbi sed varius mi. Integer vel tincidunt erat.</div>
  </details>
</div>
              
            
!

CSS

              
                body {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

.details-block {
  border: 1px solid black;
  border-bottom: none;
  details {
    border-bottom: 1px solid black;
    summary {
      cursor: pointer;
      padding: 5px;
      list-style-type: "\25B7  ";
    }
    &[open] > summary {
      color: #900;
      list-style-type: "\25BD  ";
    }
    div {
      padding: 5px 5px 5px 3ex;
    }
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console