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. 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


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="grid">
  <div class="col12">1</div>
  <div class="col6">2</div>
  <div class="col6">3</div>
  <div class="col4">4</div>
  <div class="col4">5</div>
  <div class="col4">6</div>
  <div class="col2">7</div>
  <div class="col2">8</div>
  <div class="col2">9</div>
  <div class="col2">10</div>
  <div class="col2">11</div>
  <div class="col2">12</div>


                /* base styles & reset */
:root {
  --green: #78b63c;
  --pink: #e30e76;
  --white: #f4fbf1;

::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;

body {
  line-height: 1.5;
  min-height: 100vh;
  font-family: 'Roboto', sans-serif;
  text-rendering: optimizeLegibility;
  font-weight: 700;

/* colors to show width */
.grid > * {
  color: var(--white);
  background: var(--green);

.grid > *:nth-child(even) {
  background: var(--pink);

/* grid */

.grid {
/*  implicit grid  */
  display: grid;

  /*  tracks - explicit grid */
  grid-template-columns: 200px 200px 200px;
  grid-template-rows: 200px 200px 200px;
  /*  shortcut: rows / columns  */
/*   grid-template: 200px 200px 200px / 200px 200px 200px; */
  /*  By default, a grid item cannot be smaller than the content inside of it or than the size defined. This can cause overflow. */
/*  Fractional units  */
/*   grid-template-columns: 1fr; */
/*   grid-template-columns: 1fr 2fr 1fr 2fr 1fr 2fr; */
/*   grid-template-columns: repeat(12, 1fr); */

  /*  gap or gutters  */
  gap: 16px;

  /*  Define placement of items on the grid container.
justify - main/inline axis, horizontal in grid
align - cross/block axis, vertical in grid
content - places grid tracks 
        - start, end, center, stretch, space-around, space-between, space-evenly
items - applies self to all children
      - start, end, center, stretch
/*   justify-content: space-between;
  justify-items: center; */
/*  align needs to have a height or rows defined.  */
  height: 100vh;
/*   align-items: center;
  align-content: center; */

  /*   place - shorthand for align and justify
        - items, content, self */
  place-items: center;
  place-content: center;  */

/* .col12 {
  grid-column: span 12;

.col6 {
  grid-column: span 6;

.col4 {
  grid-column: span 4;

.col2 {
  grid-column: span 2;