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


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.


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.


                %h1 Form Placeholder Labels
  Try typing in the form elements to see the placeholder elegantly turning into a label, helping you remember what the field is for.

    %input.placeholder-input#email{type: "text"}
    %label.placeholder-label{for: "email"} Email
    %input.placeholder-input#password{type: "password"}
    %label.placeholder-label{for: "password"} Password


                $placeholder-color: #aaa
$label-color: #333
$form-width: 320px
$label-width: 100px
$transition-duration: .25s

  box-sizing: border-box
  width: $form-width
  margin: 30px auto
    family: Helvetica, Arial, sans-serif
    size: 16px
  transform: translateZ(0)

    position: relative
    margin-bottom: 10px
    height: 40px
      position: absolute
      top: 14px
      left: 12px
      font-weight: 300
      color: $placeholder-color
      cursor: text
      z-index: 200
      transition: all $transition-duration
        content: ':'
        opacity: 0
        color: $label-color
        transition: all $transition-duration
      position: absolute
      width: 100%
      padding: 10px
      border-radius: 10px
      border: 1px solid $placeholder-color
      font-size: 16px
      z-index: 100
      transition: all $transition-duration
        margin-left: $label-width
        width: $form-width - $label-width
        outline: none
        & + .placeholder-label
          color: $label-color
          cursor: default
            opacity: 1

    family: Helvetica, Arial, sans-serif
    weight: 300

  margin-top: 50px
  font-weight: 300
  color: #333
  text-align: center
  width: 500px
  margin: 0 auto
  line-height: 1.5
  text-align: center


                $(".placeholder-input").on("blur", function() {
  $(this).toggleClass("not-empty", !!$(this).val());