css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              %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.
  
            
          
!
            
              @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; }
            
          
!
            
              // work in progress...
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console