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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <body class="-grid -labelling">

  <div class="wrapper">
    <header class="stylehead holder">
      <div class="device"></div>
      <div style="width: 50%">
        <h1 class="major">Heading :
          <span class="mobile-only">Mobile</span>
          <span class="tablet-only">Tablet</span>
          <span class="laptop-only">Laptop</span>
          <span class="wide-only">Wide</span>
        </h1>
      </div>
    </header>

    <h1 class="">Last night we said a great many things</h1>

    <p>Now, you've got to listen to me! You have any idea what you'd have to look forward to if you stayed here? Nine chances out of ten, we'd both wind up in a concentration camp. Isn't that true, Louie?</p>
    <h3 class="">I'm afraid Major Strasser would insist.</h3>
    <p>Now, you've got to listen to me! You have any idea what you'd have to look forward to if you stayed here? Nine chances out of ten, we'd both wind up in a concentration camp. Isn't that true, Louie?</p>
    <h5>Original SVG created in Figma</h5>
    <p>&nbsp;</p>

    <!-- This is the raw SVG file used (made in Figma)-->
    <svg width="1166" height="21" viewBox="0 0 1166 21" fill="none" xmlns="http://www.w3.org/2000/svg">
      <mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="1166" height="21">
        <rect width="1166" height="21" fill="url(#paint0_linear)"/>
      </mask>
      <g mask="url(#mask0)">
        <rect width="1166" height="21" fill="url(#paint1_radial)"/>
      </g>
      <defs>
        <linearGradient id="paint0_linear" x2="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-1166 -7 2608 -438157 -138 219063)">
        <stop offset="0" stop-color="#333" stop-opacity="0"/>
        <stop offset="0.5" stop-color="#000" stop-opacity="1"/>
        <stop offset="1" stop-opacity="0"/>
        </linearGradient>
        <radialGradient id="paint1_radial" cx="0.5" cy="0.5" r="0.5" gradientUnits="userSpaceOnUse" gradientTransform="translate(1453 -10) scale(1740 62) rotate(90)">
        <stop offset="0.0" stop-opacity="0"/>
        <stop offset="0.5" stop-opacity="0"/>
        <stop offset="1"/>
        </radialGradient>
      </defs>
    </svg>
    <div class="holder">
      <p>Now, you've got to listen to me! You have any idea what you'd have to look forward to if you stayed here? Nine chances out of ten, we'd both wind up in a concentration camp. Isn't that true, Louie?</p>
    <h3 class="">I'm afraid Major Strasser would insist.</h3>
    <p>Now, you've got to listen to me! You have any idea what you'd have to look forward to if you stayed here? Nine chances out of ten, we'd both wind up in a concentration camp. Isn't that true, Louie?</p>

      <p>&nbsp;</p>
      </div>
  </div>

</body>
              
            
!

CSS

              
                .holder {
  position: relative;
}
.holder:after {
  left: 0;
  right: 0;
  width: 100%;
  bottom: -21px;
  content: "";
  height: 21px;
  display: block;
  position: absolute;
  /* Here's the SVG embedded into the CSS BG using https://yoksel.github.io/url-encoder/ */
  background: url("data:image/svg+xml, %3Csvg width='1166' height='21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='mask0' mask-type='alpha' maskUnits='userSpaceOnUse' x='0' y='0' width='1166' height='21'%3E%3Crect width='1166' height='21' fill='url(%23paint0_linear)'/%3E%3C/mask%3E%3Cg mask='url(%23mask0)'%3E%3Crect width='1166' height='21' fill='url(%23paint1_radial)'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear' x2='1' gradientUnits='userSpaceOnUse' gradientTransform='matrix(-1166 -7 2608 -438157 -138 219063)'%3E%3Cstop offset='0' stop-color='%23333' stop-opacity='0'/%3E%3Cstop offset='0.5' stop-color='%23000' stop-opacity='1'/%3E%3Cstop offset='1' stop-opacity='0'/%3E%3C/linearGradient%3E%3CradialGradient id='paint1_radial' cx='0.5' cy='0.5' r='0.5' gradientUnits='userSpaceOnUse' gradientTransform='translate(1453 -10) scale(1740 62) rotate(90)'%3E%3Cstop offset='0.0' stop-opacity='0'/%3E%3Cstop offset='0.5' stop-opacity='0'/%3E%3Cstop offset='1'/%3E%3C/radialGradient%3E%3C/defs%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
}







.stylehead {
  //outline: 1px #777 solid;
  background: #eee;
  clear: both;
  h1 {
    font-weight: 400;
    margin-left: 1rem;
    background: none;
  }
  .device {
    &:after {
      top: calc(var(--baseline) * 2.5);
      font-size: calc(1rem / var(--typescale));
      line-height: calc(var(--baseline) / 2);
    }
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console