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="grid">
      <div class="cs1 ce2 highlight">
        <h3>cs1 ce2</h3>
      </div>
      <div class="cs3 ce5 highlight">
        <h3>cs3 ce5</h3>
      </div>
      <div class="cs6 ce12 highlight">
        <h3>cs6 ce12</h3>
      </div>
      <div class="cs1 ce1 highlight">
        <h3>cs1 ce1</h3>
      </div>
      <div class="cs2 ce2 highlight">
        <h3>cs2 ce2</h3>
      </div>
      <div class="cs3 ce3 highlight">
        <h3>cs3 ce3</h3>
      </div>
      <div class="cs4 ce4 highlight">
        <h3>cs4 ce4</h3>
      </div>
      <div class="cs5 ce5 highlight">
        <h3>cs5 ce5</h3>
      </div>
      <div class="cs6 ce6 highlight">
        <h3>cs6 ce6</h3>
      </div>
      <div class="cs7 ce7 highlight">
        <h3>cs7 ce7</h3>
      </div>
      <div class="cs8 ce8 highlight">
        <h3>cs8 ce8</h3>
      </div>
      <div class="cs9 ce9 highlight">
        <h3>cs9 ce9</h3>
      </div>
      <div class="cs10 ce10 highlight">
        <h3>cs10 ce10</h3>
      </div>
      <div class="cs11 ce11 highlight">
        <h3>cs11 ce11</h3>
      </div>
      <div class="cs12 ce12 highlight">
        <h3>cs12 ce12 </h3>
      </div>
      <div class="cs3 ce10 highlight">
        <h3>cs3 ce10 </h3>
      </div>
      <div class="cs4 ce9 highlight">
        <h3>cs4 ce9 </h3>
      </div>
      <div class="cs5 ce8 highlight">
        <h3>cs5 ce8 </h3>
      </div>
      <div class="cs1 ce12 highlight">
        <h3>cs1 ce12 </h3>
      </div>
      <div class="cs1 ce7 highlight">
        <h3>cs1 ce7</h3>
      </div>
      <div class="cs8 ce12 highlight">
        <h3>cs8 ce12 </h3>
      </div>
    </div>
              
            
!

CSS

              
                :root {
  /* Grid related var*/
  --grid-tc-12: repeat(12, 1fr);
  --grid-tc-1: repeat(1, 1fr);
  --grid-gap: 1.25vw;
  --grid-gap-s: 1.25vw; /* if you want to use specific value for smaller screens */
}

/* Normalizer */
* {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: inherit;
  font: inherit;
  vertical-align: baseline;
}

/* Grid system */
grid,
.grid {
  display: grid;
  grid-template-columns: var(--grid-tc-12);
  grid-column-gap: var(--grid-gap);
  grid-row-gap: var(--grid-gap);
  align-content: stretch;
}

grid,
.grid > *,
div {
  align-self: center;
}

*[class~="cs1"] {
  grid-column-start: 1;
}
*[class~="cs2"] {
  grid-column-start: 2;
}
*[class~="cs3"] {
  grid-column-start: 3;
}
*[class~="cs4"] {
  grid-column-start: 4;
}
*[class~="cs5"] {
  grid-column-start: 5;
}
*[class~="cs6"] {
  grid-column-start: 6;
}
*[class~="cs7"] {
  grid-column-start: 7;
}
*[class~="cs8"] {
  grid-column-start: 8;
}
*[class~="cs9"] {
  grid-column-start: 9;
}
*[class~="cs10"] {
  grid-column-start: 10;
}
*[class~="cs11"] {
  grid-column-start: 11;
}
*[class~="cs12"] {
  grid-column-start: 12;
}

*[class~="ce1"] {
  grid-column-end: 2;
}
*[class~="ce2"] {
  grid-column-end: 3;
}
*[class~="ce3"] {
  grid-column-end: 4;
}
*[class~="ce4"] {
  grid-column-end: 5;
}
*[class~="ce5"] {
  grid-column-end: 6;
}
*[class~="ce6"] {
  grid-column-end: 7;
}
*[class~="ce7"] {
  grid-column-end: 8;
}
*[class~="ce8"] {
  grid-column-end: 9;
}
*[class~="ce9"] {
  grid-column-end: 10;
}
*[class~="ce10"] {
  grid-column-end: 11;
}
*[class~="ce11"] {
  grid-column-end: 12;
}
*[class~="ce12"] {
  grid-column-end: 13;
}

/* Debugging */

.debug {
  background-color: lightcoral;
}

/* Media queries */

@media only screen and (min-width: 1px) and (max-width: 1024px) {
  grid,
  .grid {
    grid-template-columns: var(--grid-tc-1);
    grid-column-gap: var(--grid-gap-s);
    grid-row-gap: var(--grid-gap-s);
  }
  grid,
  .grid > *[class~="cs1"],
  *[class~="cs2"],
  *[class~="cs3"],
  *[class~="cs4"],
  *[class~="cs5"],
  *[class~="cs6"],
  *[class~="cs7"],
  *[class~="cs8"],
  *[class~="cs9"],
  *[class~="cs10"],
  *[class~="cs11"],
  *[class~="cs12"] {
    grid-column-start: 1;
  }
  grid,
  .grid > *[class~="ce1"],
  *[class~="ce2"],
  *[class~="ce3"],
  *[class~="ce4"],
  *[class~="ce5"],
  *[class~="ce6"],
  *[class~="ce7"],
  *[class~="ce8"],
  *[class~="ce9"],
  *[class~="ce10"],
  *[class~="ce11"],
  *[class~="ce12"] {
    grid-column-end: 13;
  }
}

/* Debuggin */ 
body {
  padding: 32px;
  background-color: #131313;
  color: white;
  font-family: Helvetica, sans-serif;
}

h3 {
  font-size: 20px;
  padding: 8px 16px;
}

.highlight {
  border: 1px dashed #eb5757;
}

              
            
!

JS

              
                
              
            
!
999px

Console