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.


                <div class="container">

    There is common baseline (4px) and breakpoint 640px changes multiplier only

    All line heights, margins and paddings are computed from baseline*multiplier calculation.

    Lorem ipsum dolor sit, amet consectetur adipisicing elit. Magni expedita molestiae earum autem ex, aliquid, explicabo veniam nulla voluptas placeat perferendis numquam hic. Tempora, dolor aliquam quas magnam architecto aspernatur.



                :root {
  --baseline: 4;
  --baseline-multiplier: 7;  
  --line-height: calc(var(--baseline-multiplier) * var(--baseline) * 1px); /* 28px */

p, h1, h2 {
  line-height: var(--line-height);
  font-size: calc(var(--line-height) / 1.4);
  padding: 0;
  margin: 0;
  margin-bottom: var(--line-height);

h1 {
  --baseline-multiplier: 12;
  --line-height: calc(var(--baseline-multiplier) * var(--baseline) * 1px); 

h2 {
  --baseline-multiplier: 10;
  --line-height: calc(var(--baseline-multiplier) * var(--baseline) * 1px);   

@media (min-width: 640px) {
  :root {
    --baseline-multiplier: 10;  

/* typo grid on background: */
.container {
  --baseline-px: calc(var(--baseline)*1px);
  --baseline-min-px: calc(var(--baseline)*1px - 1px);
      to bottom, 
      transparent 0, 
      transparent var(--baseline-min-px), 
      lightblue var(--baseline-px)

/* etc. */

body {  
  font-family: Georgia, serif;

button {
  background: lightgrey;
  font: inherit;

.container {
  max-width: 50em;
  margin: 0 auto;
  padding: var(--line-height);

* {
  transition: .2s all;