Pen Settings

↑ Insert the most common viewport meta tag

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.


              h2 Media Query Test
p.explain The two boxes below are sized via media query. The top one uses ems, and the bottom uses pixels. With a 16px base font size, both should be identical in width. Likewise for browser zooming. But when the base font size changes, most browsers will show them with different widths. (Change your browser's font size and drag the window width to see it in action.)

h3.em Em-based media query

h3.px Pixel-based media query
p.px How to change base font size
    a(href="") Chrome
    a(href="") Firefox


              @import compass

= break($em)
  $px: #{($em * 16)}px
  $ems: #{$em}em
  @media (min-width: $ems)
      width: $ems
        content: "#{$ems} (16px * #{$em} = #{$px})"
  @media (min-width: $px)
      width: $px
        content: "#{$px}"

  margin-bottom: 3em
p.px, p.em
  border: 1px solid #ddd
  padding: 1em 0
  background-color: lightblue
  background-color: lightgreen

  margin-top: 4em
  padding-top: 1.5em
  border-top: 1px solid #ddd



Loading ..................