Pen Settings



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


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


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.


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.


                <header class="header">
  <div class="header__title">
  <div class="header__reference">
    <ul class="reference-list">
      <li><a class="reference-list__link" href="">MDN reference</a></li>
      <li><a class="reference-list__link" href="">caniuse Support</a></li>

  <div class="example">
      In this example, we have a <code>repeat()</code> function present as an argument for our <code>grid-template-columns</code> property. The <code>repeat()</code> function instructs the browser to create six grid columns, alternating between two widths: <code>40px</code> and <code>80px</code>. If we add another list item, <code>repeat()</code>'s instructions will ensure the next column is <code>40px</code> wide.

    <div class="example__demo example__demo--repeat">
      <ol class="grid">
        <li class="grid__col">Alpha</li>
        <li class="grid__col">Beta</li>
        <li class="grid__col">Gamma</li>
        <li class="grid__col">Delta</li>
        <li class="grid__col">Epsilon</li>
        <li class="grid__col">Zeta</li>
      Also note that we're using the <code>odd</code> and <code>even</code> keywords for our <code>:nth-child</code> function to control the background colors grid columns! 


                // Demo
.grid {
  display: grid;
  grid-gap: 10px;
  grid-template-columns: repeat(6, 40px 80px);
  height: 6rem;

.grid__col:nth-child(odd) {
  background-color: var(--color-sand);

.grid__col:nth-child(even) {
  border: 2px dashed var(--color-hibiscus);
  background-color: rgba(341, 74, 78, 0.2);

// Pen Setup
.example__demo--repeat {
  color: var(--color-cinder);
  padding: 0.75rem;

.grid {
  list-style-type: none;
  margin: 0;
  padding: 0;

.grid__col {
  padding: 0.5rem 0.25rem;
  writing-mode: vertical-lr;