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

              
                %article.content  
  %h1 Vertical rhythm
  
  %p Lorem ipsum isn't a great choice to use for demonstrating good typography. Ideally you would use real content. However for the demonstration in the post, I think it's acceptable. I could use my content, it would be strange and cause some duplication I imagine.
  
  %h2 A heading that is quite long to show the line height
  %p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Restinguet citius, si ardentem acceperit. Sed tu istuc dixti bene Latine, parum plane. Quid enim tanto opus est instrumento in optimis artibus.
  
  %h3 A heading related to the one above
  %p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Esse enim quam vellet iniquus iustus poterat inpune.
  
  %h4 A heading related to the one above
  %p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Esse enim quam vellet iniquus iustus poterat inpune.
  
  %h5 A level 5 heading
  %p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Esse enim quam vellet iniquus iustus poterat inpune.
  
  %h6 A level 6 heading
  %p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Esse enim quam vellet iniquus iustus poterat inpune.
  
              
            
!

CSS

              
                body {
  font-size: 16px;
  line-height: 1.5;

  // Demonstrate the vertical rhythm at 12px
  background-image: linear-gradient(#eee 1px, transparent 1px);
  background-size: 100% 12px; }

/* Aligns to 72px */
h1 {
  font-size: 36px;
  line-height: 1.16666666666;
  margin-bottom: 30px; }

/* Aligns to 72px */
h2 {
  font-size: 30px;
  line-height: 1.2;
  padding-top: 24px;
  margin-bottom: 12px; }

/* Aligns to 48px */
h3 {
  font-size: 24px;
  line-height: 1.25;
  padding-top: 12px;
  margin-bottom: 6px; }

/* Aligns to 36px */
h4 {
  font-size: 21px;
  line-height: 1.3333333;
  padding-top: 12px;
  margin-bottom: 8px; }

/* Aligns to 36px */
h5 {
  font-size: 18px;
  line-height: 1.5;
  padding-top: 12px;
  margin-bottom: 9px; }

/* Aligns to 36px */
h6 {
  font-size: 16px;
  line-height: 1.5;
  padding-top: 9px;
  margin-bottom: 3px; }

p {
  margin-bottom: 12px; }

h1, h2, h3,
h4, h5, h6,
p {
  margin-top: 0; }

// Misc set up stuff
h1, h2, h3,
h4, h5, h6 {
  font-family: Helvetica Neue, sans-serif; }

body {
  font-family: Georgia, serif; }

.content {
  max-width: 27.5em; /* 440/16 */
  margin: auto;
  padding: 3em 0; }
              
            
!

JS

              
                
              
            
!
999px

Console