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>Cards</h2>
<p id="version">Last updated in <a href="https://cdn.watermarkinsights.com/css/rc/1.1.12.6/wm-global.css" target="blank">1.1.12</a></p>
<p>Cards may be used to visually organize content into sections. They may contain a header, a footer or both. The header may contain an appropriate heading (h1 - h6) with a class of <code>title</code>.</p>
<p>It may also have an element with an eyebrow title by adding an <code>eyebrowtitle</code> class.</p>
<div class="paper-card -inaset">
  <div class="header">
    <p class="eyebrowtitle">What it's all about</p>
    <h3 class="title">The card title</h3>
  </div>
  <div class="body">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc aliquet consectetur ex ut pulvinar. Fusce mattis tristique tincidunt. Pellentesque id viverra tortor, eget tempor ex.</p>
    <p>Morbi pulvinar tempus bibendum. In ultrices, diam ut interdum pellentesque, turpis sapien faucibus felis, tincidunt porta orci dolor eget ipsum. Vestibulum rutrum dui leo, eget fermentum quam fringilla in. Vestibulum vel nisi ac magna sollicitudin venenatis vitae eleifend dolor. Vivamus sed lobortis velit. Ut sed urna tortor. Curabitur ornare tortor ut arcu laoreet, ut ultrices turpis bibendum. Mauris diam magna, pretium ut est vel, sollicitudin porttitor dui. Morbi sit amet arcu pharetra, pharetra orci ut, vestibulum dui. Proin vulputate semper velit, a ornare ex. Suspendisse fringilla a nunc vitae elementum. Nulla blandit hendrerit magna ut faucibus.</p>
  </div>
  <div class="footer">
    <div class="button-collection">
      <wm-button>Cancel</wm-button>
      <wm-button button-type="primary">Action</wm-button>
    </div>
  </div>
</div>
<div class="paper-card -inaset -nobottompadding">
  <div class="header">
    <h3 class="title">A second card in this set</h3>
  </div>
  <div class="body">
    <p>Morbi egestas lectus vitae diam congue blandit. Proin iaculis velit enim, eu mollis quam molestie iaculis. Phasellus non tellus at justo lobortis consectetur.</p>
  </div>
</div>

<div class="paper-card -empty -inaset">
  <div class="header">
    <h3 class="title">Data</h3>
  </div>
  <div class="body">
    <h3 class="empty-hdr">
      There is no data to show here
    </h3>
    <p class="description">
      An explanation of why this is empty and how to go about resolving this issue.
    </p>
  </div>
</div>

<div class="paper-card -empty -notoppadding">
  <div class="body">
    <p class="description">
      There is no table data.
    </p>
    <wm-button button-type="secondary">Add Data</wm-button>
  </div>
</div>

<h2 id="variantclasseshdr">Variations</h2>
<p>The header, body and footer for standard cards, have padding aplied. By adding certain classes to the container element, this may be changed without having to write page-specific stying rules. Additionally, there are also a couple other helper classes, as follows:</p>
<table id="variantclasses" aria-labelledby="variantclasseshdr" class="data-table">
  <thead>
    <tr>
      <th scope="col" class="dataheadercell">Class Name</th>
      <th scope="col" class="dataheadercell">Effect</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td class="datacell" data-th="Class Name">-collapsed</td>
      <td class="datacell" data-th="Effect">Removes the rule at the bottom of the header when a card is in a collapsed state.</td>
    </tr>
    <tr>
      <td class="datacell" data-th="Class Name">-inaset</td>
      <td class="datacell" data-th="Effect">Adds a space between cards that are stacked vertically in a set.</td>
    </tr>
    <tr>
      <td class="datacell" data-th="Class Name">-nobottompadding</td>
      <td class="datacell" data-th="Effect">Removes the padding from the bottom of the card.</td>
    </tr>
    <tr>
      <td class="datacell" data-th="Class Name">-nopadding</td>
      <td class="datacell" data-th="Effect">Removes the padding from the card.</td>
    </tr>
    <tr>
      <td class="datacell" data-th="Class Name">-nosidepadding</td>
      <td class="datacell" data-th="Effect">Removes the padding from the sides of the card.</td>
    </tr>
    <tr>
      <td class="datacell" data-th="Class Name">-notoppadding</td>
      <td class="datacell" data-th="Effect">Removes the padding from the top of the card.</td>
    </tr>
    <tr>
      <td class="datacell" data-th="Class Name">-noborder</td>
      <td class="datacell" data-th="Effect">Applied to the footer element: removes the rule above the footer.</td>
    </tr>
  </tbody>
</table>
              
            
!

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;
  }
}
.paper-card {
  max-width: 578px;
  
  p {
    margin: 0;
    
    + p {
      margin-top: 16px;
    }
  }
}

#version {
  font-style: italic;
}
              
            
!

JS

              
                import { defineCustomElements } from "https://cdn.jsdelivr.net/npm/@watermarkinsights/ripple@3.8.2/dist/loader/index.js";

defineCustomElements();
              
            
!
999px

Console