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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <div class="container">
  <h2>EB Garamond</h2>

  <label>Standard ligatures on (with contextual alternates)</label>
  <p><span class="liga-on">a fickle fluffy puffle</span></p>

  <label>Standard ligatures off (with contextual alternates)</label>
  <p><span class="liga-off">a fickle fluffy puffle</span></p>

  <label>Standard ligatures off (without contextual alternates)</label>
  <p><span class="liga-all-off">a fickle fluffy puffle</span></p>

  
  
  <label>Kitchen sink (look at the tail on that Q!)</label>
  <p>
    <span class="kitchen-sink">Question: is the perfect fluffle puffle is still a fluffy puff?</span></p>
  
  <label>Kitchen sink (no contextual alternates)</label>
  <p>
    <span class="kitchen-sink-alt">Question: is the perfect fluffle puffle is still a fluffy puff?</span></p>

 
   <h2>Playfair Display</h2>

   <label>Arrows-a-Fancy (contextual alternates creating fancy symbols)</label>
  <p>
    <span class="fancy-arrows"> -^ <-> </span></p>
     <label>Arrows-not-so-Fancy (contextual alternates off)</label>
  <p>
    <span class="fancy-arrows-off"> -^ <-> ^- </span></p>

    <label>Another part of the story (fractions of the whole)</label>
  <p>
    <span class="fractions">1/2 or 1/4 of the story. Now with 11/32 more exaggeration</span></p>
     <label>Keep your numerator away from my denominator</label>
  <p>
    <span class="fractions-off">1/2 or 1/4 of the story. Now with 11/32 more exaggeration</span></p>

</div>



              
            
!

CSS

              
                /* Font found here: https://github.com/georgd/EB-Garamond */
@font-face {
  font-family: 'Garamond';
  src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/57225/EBGaramond12-Regular.woff') format('woff');
  font-weight: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair';
  src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/57225/playfair-display-regular.woff2') format('woff2');
  src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/57225/playfair-display-regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


p {
  font-family: "Garamond", Georgia, serif;
  font-size: 4rem;
  line-height: 1.1;
  margin-top: 0.5rem;
  padding-top: 0;
}

/* works with pretty much all browsers that support web fonts, but not the preferred syntax */
.liga-on {
  font-feature-settings: "liga" 1;
}
.liga-off {
  font-feature-settings: "liga" 0;
}
.liga-all-off {
  font-feature-settings: "liga" 0 "calt" 0;
}
.fancy-arrows {
  font-family: "Playfair";
  font-feature-settings: "calt";
}
.fancy-arrows-off {
  font-family: "Playfair";
  font-feature-settings: "calt" 0;
}
.fractions {
  font-family: "Playfair";
  font-feature-settings: "frac";
}
.fractions-off {
  font-family: "Playfair";
  font-feature-settings: "frac" 0;
}

/* Works with current shipping browsers that support web fonts (Edge support is v75+) */
@supports (font-variant-ligatures: common-ligatures) {
  .liga-on {
    font-feature-settings: normal;
    font-variant-ligatures: common-ligatures;
  }
  .liga-off {
    font-feature-settings: normal;
    font-variant-ligatures: no-common-ligatures;
  }
  .liga-all-off {
    font-feature-settings: normal;
    font-variant-ligatures: no-common-ligatures no-contextual;
  }
  .kitchen-sink {
    font-feature-settings: normal;
    font-variant-ligatures: historical-ligatures discretionary-ligatures common-ligatures ;
  }
  .kitchen-sink-alt {
    font-feature-settings: normal;
    font-variant-ligatures: historical-ligatures discretionary-ligatures common-ligatures no-contextual;
  }
  .fancy-arrows {
    font-variant-ligatures: common-ligatures discretionary-ligatures contextual;
  }
}
@supports (font-variant-numeric: diagonal-fractions) {

  .fractions {
    font-family: "Playfair";
    font-variant-numeric: diagonal-fractions;
  }
  .fractions-off {
    font-family: "Playfair";
    font-feature-settings: no-diagonal-fractions;
  }
}

/* other general styles */
.container {
  margin: 2rem auto;
  width: 37rem;
}

h2 {
  font-family: Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: bold;
}

label {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  font-weight: normal;
}

              
            
!

JS

              
                
              
            
!
999px

Console