Pen Settings



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


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


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.


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.


  <span class="h0">Huge</span>
  <h1>Main Heading</h1>
  <h2>Second Heading may be long enough to wrap on a few lines but the funny thing is that the spacing is consistent</h2>
  <h3>Heading Three</h3>
  <h4>Heading Four</h4>
  <h5>Heading Five</h5>
  <h6>Heading Six</h6>


                $baseline-unit:         12px                !default;
$baseline-debug:        true               !default;

@mixin baseline($baseline-font-size: 16px, $baseline-line-height: 1.25, $cap-height-ratio: 0.68, $margin-bottom: 3rem) {

    $baseline-distance: ($baseline-line-height - $cap-height-ratio) / 2;

    // set the proper font-size and line-height to size the element in multiples of baseline units
    font-size: ($baseline-font-size / $baseline-unit) * 1rem;
    line-height: $baseline-line-height;

    padding-top: calc(1rem - #{$baseline-distance * 1em});
    padding-bottom: calc(1rem - #{$baseline-distance * 1em});
    margin-bottom: calc(#{$margin-bottom} - 2rem);

    @if $baseline-debug == true {
        position: relative;

        &:after {
            content: "";

            position: absolute;
            top: calc(100% - 1rem);
            left: 0;
            z-index: -1;

            width: 100%;
            height: $margin-bottom;

            background: rgba(0, 128, 255, 0.25);

        &:before {
            background: white;
            top: 1rem;

$cap-size-font-headings: 0.7;

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

section {
  max-width: 40em;
  padding: 4rem;
  margin: auto;

h1, h2, h3, h4, h5, h6 {
  margin: 0;

.h0 {
    display: block;
    font-weight: bold;
    @include baseline(90px, 1, $cap-size-font-headings, 3rem);
    text-transform: uppercase;

h1 {
    @include baseline(60px, 1, $cap-size-font-headings, 3rem);

h2 {
    @include baseline(24px, 1.25, $cap-size-font-headings, 3rem);

h3 {
    @include baseline(16px, 1.25, $cap-size-font-headings, 3rem);

h4 {
    @include baseline(13px, 1.25, $cap-size-font-headings, 3rem);

h6 {
    @include baseline(13px, 15/13, $cap-size-font-headings, 2rem);