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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <main class="container">
  <div class="container article">
    <article>
      <h2>Article 1</h2>
      <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Sapiente molestias ipsa quibusdam. Molestiae laboriosam quisquam officiis, nobis neque corrupti? Optio distinctio cupiditate dicta totam voluptate at corporis voluptatem corrupti consequuntur. </p>
    </article>
  </div>
  <div class="container article">
    <article>
      <h2>Article 2</h2>
      <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugit, voluptates ea? Debitis veniam tempora, sequi nemo dicta reiciendis sunt asperiores cum fugiat, impedit consequuntur rem voluptatum temporibus, rerum adipisci sit.</p>
    </article>
  </div>
  <div class="container article">
    <article>
      <h2>Article 3</h2>
      <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Tenetur minima pariatur nulla, aspernatur sapiente dolorem odio delectus! Similique nostrum blanditiis quam, quidem expedita repudiandae harum odit officia porro soluta ducimus!</p>
    </article>
  </div>
</main>
              
            
!

CSS

              
                * {
  box-sizing: border-box;
}

body {
  padding: 1rem;
}

.container {
  container-type: inline-size;
}

main {
  display: flex;
  flex-wrap: wrap;
}

.article {
  flex: 1 1 30ch;
}

article {
  padding: 1rem;
  font-size: 1rem;
}

@container size(min-width: 60ch) {
  /* A container cannot itself be styled within a query,
  but it can be used to select its descendants */
  .container:nth-child(odd) > article {
    border: 1px solid grey;
  }

  article {
    padding: 2rem;
    font-size: 1.25rem;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console