Pen Settings

HTML

CSS

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

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

Auto Save

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

              
                <h2>Grid</h2>
<p id="version">Last updated in <a href="https://cdn.watermarkinsights.com/css/1.1.11/wm-global.css" target="blank">1.1.11</a></p>
<h2>A two-column layout with equal column widths</h2>
<div class="wm-grid">
  <div class="wm-grid-row">
    <div class="wm-grid-col-6">
      <div class="content">1</div>
    </div>
    <div class="wm-grid-col-6">
      <div class="content">2</div>
    </div>
  </div>
  <h2>Responsive layout</h2>
  <p>A two-column layout for browsers wider than 1024px (one-third/two-thirds widths). For browsers 1024px wide or less the layout changes to a single column. <em>Change your browser's width to see the change.</em>
  </p>
  <div class="wm-grid-row">
    <div class="wm-grid-col-4 wm-grid-col-md-10">
      <div class="content">3</div>
    </div>
    <div class="wm-grid-col-8 wm-grid-col-md-10">
      <div class="content">4</div>
    </div>
  </div>
  
  <p>A layout that changes from four-column to two-column to a single column from widest to smallest.</em>
  </p>
  <div class="wm-grid-row">
    <div class="wm-grid-col-3 wm-grid-col-md-5 wm-grid-col-sm-8">
      <div class="content">5</div>
    </div>
    <div class="wm-grid-col-3 wm-grid-col-md-5 wm-grid-col-sm-8">
      <div class="content">6</div>
    </div>
    <div class="wm-grid-col-3 wm-grid-col-md-5 wm-grid-col-sm-8">
      <div class="content">7</div>
    </div>
    <div class="wm-grid-col-3 wm-grid-col-md-5 wm-grid-col-sm-8">
      <div class="content">8</div>
    </div>
  </div>
</div>
<p>The number of grid columns changes for us at different screen sizes. For now, and to prevent any breaking changes, we still need to use the wm-grid-row class. This may change in a future version.</p>
<p class="infolink">For more information, see the Grid & Spacing on the <a href="https://ripple.watermarkinsights.com/grid" target="_blank">Ripple Design System</a>.</p>
              
            
!

CSS

              
                html, body {
  height: auto;
}
body {
  padding: 0 20px 40px;
  font-size: 14px;
}
h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 0;
  
  &:not(:first-of-type) {
    margin-top: 32px;
  }
  
  + p {
    margin-top: 0;
  }
}
p + .wm-grid-row {
  margin-top: 12px;
}
.wm-grid-row {
  margin: 4px 0 20px;
}
.wm-grid .content {
  background: #2e1b46;
  height: 60px;
  margin-bottom: 10px;
  line-height: 60px;
  text-align: center;
  font-size: 28px;
  color: #fff;
}
.wm-grid div[class*=wm-grid-col]:nth-of-type(even) .content {
  background: #7f97ad;
  color: #fff;
}
.infolink {
  padding-bottom: 20px;
}
#version {
  font-style: italic;
}
              
            
!

JS

              
                
              
            
!
999px

Console