Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <base href="https://raw-dot-custom-elements.appspot.com/PolymerElements/iron-collapse/v2.0.0/iron-collapse/">
<script src="../webcomponentsjs/webcomponents-lite.js"></script>

<link rel="import" href="../iron-demo-helpers/demo-snippet.html">
<link rel="import" href="../iron-demo-helpers/demo-pages-shared-styles.html">
<link rel="import" href="demo/simple-expand-collapse.html">

<custom-style>
  <style include="demo-pages-shared-styles">
    demo-snippet {
      --demo-snippet-code: {
        max-height: 250px;
      }
    }
    simple-expand-collapse {
      margin: 10px;
    }
    .content {
      padding: 15px;
    }
  </style>
</custom-style>

<h4>Nested, horizontal expand</h4>
<demo-snippet>
  <template>
      <style>
        simple-expand-collapse[horizontal] .content {
          max-height: 250px;
          overflow: auto;
        }
      </style>

      <simple-expand-collapse>
        <div class="content">
          <div>
            Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum petentium suavitate, eum
            eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus. Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea,
            id minim maiestatis incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique
            neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus.
          </div>
          <simple-expand-collapse horizontal>
            <div class="content">
              Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum petentium suavitate, eum
              eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus. Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere
              ea, id minim maiestatis incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos
              reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus.
            </div>
          </simple-expand-collapse>
        </div>
      </simple-expand-collapse>
    </template>
</demo-snippet>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console