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

              
                <div class="container">
  <h1>
    Sunday brunches
  </h1>
  <p class="caption">
    Nautical miles often fool people into thinking of spins around in <strong>fancy boats</strong>, sunglasses donned with a scarf flying behind in the wind. Make mine neat but astute queen bees always see the zebra in among. The rose garden looked so good in the winter, we then let it grow outside in the summer and were amazed.
  </p>
</div>

              
            
!

CSS

              
                /* Amstelvar Variable Font */
@font-face {
  font-family: 'Amstelvar VF';
  src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/57225/AmstelvarAlpha-VF.ttf') format('truetype');
  font-display: swap;
}

:root {
  --p-font-size: 1;
  --p-wght: 75;
}

html {
  font-size: 100%;
}

.container {
  margin: 0 auto 2rem auto;
  max-width: 35rem;
}

.container:hover {
  --p-font-size: 1.5;
  --p-wght: 120;
}

p, 
th, 
td, 
ul, 
li {
	font-family: "Amstelvar VF", Georgia, "New Times Roman", serif;
  font-size: calc( var(--p-font-size) * 1em);
	font-weight: normal;
  font-variation-settings: 
    'wght' var(--p-wght), 
    'wdth' 402, 
    'opsz' calc( ( var(--p-font-size) * 16 ) ), 
    'GRAD' 88;
  font-style: normal;
  line-height: 1.5;
	transition: all linear 0.2s; 	
}

/* Set weight and optical size relative to normal body copy */
p strong {
  font-variation-settings: 
    'wght' calc( ( var(--p-wght) * 1.5 ) ), 
    'wdth' 402, 
    'opsz' calc( ( var(--p-font-size) * 16 ) ), 
    'GRAD' 88;
}

/* Set font size, weight and optical size relative to normal body copy */
h1 {
	font-family: "Amstelvar VF", Georgia, "New Times Roman", serif;
  /* This calculation is always 'live' so when the value of '--p-font-size' changes on hover, this changes as well and multiplies the new paragraph size by 2 to get a heading twice the size of the body copy */
  font-size: calc( var(--p-font-size) * 2 * 1em);
  font-variation-settings: 
    'wght' calc( ( var(--p-wght) * 1.75 ) ), 
    'wdth' 402, 
    'opsz' calc( var(--p-font-size) * 2 ), 
    'GRAD' 88;
  font-style: normal;
  line-height: 1.15;
	transition: all linear 0.2s; 	
}


              
            
!

JS

              
                
              
            
!
999px

Console