Pen Settings



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


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.


                <section class="parent">
  <div class="block frame-1x1 tomato">1</div>
  <div class="block frame-2x2 slateBlue">2</div>
  <div class="block frame-1x2 orange">3</div>
  <div class="block frame-1x1 gray">4</div>
  <div class="block frame-2x1 dodgerBlue">5</div>
  <div class="block frame-2x1 gray">6</div>
  <div class="block frame-3x1 mediumSeaGreen">7</div>
  <div class="block frame-1x1 gray">8</div>
  <div class="block frame-2x2 slateBlue">9</div>
  <div class="block frame-1x1 gray">10</div>
  <div class="block frame-1x1 violet">11</div>
  <div class="block frame-1x1 gray">12</div>
  <div class="block frame-2x1 tomato">13</div>
  <div class="block frame-1x1 gray">14</div>


                .parent {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-template-rows: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-flow:row dense;
  grid-gap: 10px;
  padding: 10px;

.gray {
  background-color: rgba(0,0,0,0.1);

.tomato { background-color: Tomato; }
.orange { background-color: Orange; }
.dodgerBlue { background-color: DodgerBlue; }
.mediumSeaGreen { background-color: MediumSeaGreen; }
.gray { background-color: gray; }
.slateBlue { background-color: SlateBlue; }
.violet { background-color: Violet; }

.block {
  border-radius: 5px;
  font-size: 28px;
  font-weight: 600;
  color: white;
  &.frame-1x1 {
    grid-column: span 1;
    grid-row: span 1;
  &.frame-2x2 {
    grid-column: span 2;
    grid-row: span 2;
  &.frame-1x2 {
    grid-column: span 1;
    grid-row: span 2;
  &.frame-2x1 {
    grid-column: span 2;
    grid-row: span 1;