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

              
                %article.content  
  %h1 Tips for a responsive 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 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 which is longer
  %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

              
                @import "compass";
@import "breakpoint";

// Defaults
$base-font-size: 12px;
$default-context: $base-font-size;

// Easy em conversion
@function em($target-px, $context: $default-context) {
	@return ($target-px / $context) * 1em; }

  body {
    font-size: $base-font-size;
    line-height: 1.5;

    @include breakpoint(520px) {
      font-size: 16px; }
  
  // Set our scalable vertical rhythm guide
  background-image: linear-gradient(bottom, #ddd 5%, rgba(white, 0) 5%);
  background-size: 100% .75em; }

/* Aligns to 60px */
h1 {
  font-size: em(30px);
  line-height: 1.2;
  margin-bottom: em(24px, 30px); }

/* Aligns to 48px */
h2 {
  font-size: em(24px);
  line-height: 1.25;
  padding-top: em(6px, 24px);
  margin-bottom: em(12px, 24px); }

/* Aligns to 48px */
h3 {
  font-size: em(21px);
  line-height: 1.238095238;
  padding-top: em(16px, 21px);
  margin-bottom: em(6px, 21px); }

/* Aligns to 48px */
h4 {
  font-size: em(18px);
  line-height: 1.222222222;
  padding-top: em(18px, 18px);
  margin-bottom: em(8px, 18px); }

/* Aligns to 48px */
h5 {
  font-size: em(16px);
  line-height: 1.5;
  padding-top: em(16px, 16px);
  margin-bottom: em(8px, 16px); }

/* Aligns to 36px */
h6 {
  font-size: em(14px);
  line-height: 1.5;
  padding-top: em(9px, 14px);
  margin-bottom: em(6px, 14px); }

p {
  margin-bottom: 12px; }

#{headings()},
p {
  margin-top: 0; }

// Misc set up stuff
#{headings()} {
  font-family: Helvetica Neue, sans-serif; }

body {
  font-family: Georgia, serif; }

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

JS

              
                // work in progress...
              
            
!
999px

Console