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

              
                <main>
  <h1>Scratch at the door then walk away</h1>
  <h2>Pet me pet me pet me pet me, bite, scratch why are you petting me?</h2> 
  <p>Your pillow is now my pet bed yet claw your carpet in places everyone can see - why hide my amazing artistic clawing skills? and howl on top of tall thing pretend you want to go out but then don't give me some of your food give me some of your food give me some of your food.</p>
  <h3>Meh, i don't want it floof tum, tickle bum, jellybean footies curly toes.</h3>
  <p>Walk on car leaving trail of paw prints on hood and windshield. The dog smells bad thug cat.</p>
  <h4>Why dog in house? I'm the sole ruler of this home and its inhabitants</h4>
  <p>Smelly, stupid dogs, inferior furballs time for night-hunt, human freakout. Sleep on my human's head who's the baby pee in the shoe bite nose of your human so step on your keyboard while you're gaming and then turn in a circle cough hairball, eat toilet paper. Chill on the couch table demand to be let outside at once, and expect owner to wait for me as I think about it but spit up on light gray carpet instead of adjacent linoleum kitty time claw at curtains stretch and yawn nibble on tuna ignore human bite human hand.</p>
  <h5>Somehow manage to catch a bird but have no idea what to do next, so play with it until it dies of shock.</h5>
  <p>Find empty spot in cupboard and sleep all day hiding behind the couch until lured out by a feathery toy i will ruin the couch with my claws. It's 3am, time to create some chaos run in circles, find a way to fit in tiny box. Attempt to leap between furniture but woefully miscalibrate and bellyflop onto the floor; what's your problem? i meant to do that now i shall wash myself intently refuse to come home when humans are going to bed; stay out all night then yowl like i am dying at 4am for the fat cat sat on the mat bat away with paws wake up human for food at 4am.</p>
</main>
              
            
!

CSS

              
                @function grid($count) {
  @return calc(4px * #{$count});
}


body {
  font-size: 18px;
	font-size: clamp(16px, 2.5vmin, 18px);
  line-height: grid(8);
  line-height: clamp(#{grid(7)}, 140%, #{grid(8)});
}
h1 {
	font-size: 2.5rem;
	font-size: clamp(1.75rem, 5vmin, 2.5rem);
  line-height: grid(10);
  line-height: clamp(#{grid(8)}, 120%, #{grid(10)});
}
h2 {
	font-size: 2rem;
	font-size: clamp(1.5rem, 4vmin, 2rem);
  line-height: grid(8);
  line-height: clamp(#{grid(8)}, 120%, #{grid(11)});
}
h3 {
	font-size: 1.75rem;
	font-size: clamp(1.2rem, 3.5vmin, 1.75rem);
  line-height: grid(10);
  line-height: clamp(#{grid(7)}, 120%, #{grid(10)});
}
h4 {
	font-size: 1.5rem;
	font-size: clamp(1.1rem, 3vmin, 1.5rem);
  line-height: grid(9);
  line-height: clamp(#{grid(7)}, 120%, #{grid(9)});
}
h5 {
	font-size: 1.2rem;
	font-size: clamp(1rem, 2.5vmin, 1.2rem);
  line-height: grid(8);
  line-height: clamp(#{grid(6)}, 130%, #{grid(8)});
}

/////////
// Visual styles unrelated to fluid typography

body {
  font-family: Helvetica, Arial, sans-serif;
  padding: grid(4);
}

main {
  margin: auto;
  max-width: 900px;
}

h1, h2, h3, h4, h5 {
  margin: grid(8) 0 grid(2);
}

p {
  margin: 0;
  
  + p {
    margin-top: grid(4);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console