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

              
                <div class="entry pencil-cup"></div>
              
            
!

CSS

              
                black(alpha)
  rgba(0,0,0,alpha)

body
  background-color: darken(gainsboro,10)
  position: relative
  height: 100vh
  text-align: center
  
.entry
  position: absolute
  left: 50%
  top: 50%

  &:before,
  &:after
    display: block
    content: ''
    position: absolute
    
  &.pencil-cup
    width: 68px
    height: 100px
    margin-left: -(@width/2)
    margin-top: -70px
    background-image: repeating-linear-gradient(to right, transparent,
                                                          transparent 8px,
                                                          slategrey 8px,
                                                          slategrey 10px),
                      linear-gradient(to bottom, pink 10px,
                                                 silver 10px,
                                                 silver 16px,
                                                 transparent 16px),
                      linear-gradient(to right, lemonchiffon 20px,
                                                palegoldenrod 20px,
                                                palegoldenrod 30px,
                                                lemonchiffon 30px,
                                                lemonchiffon 50px,
                                                palegoldenrod 50px)
    border-radius: 3px
    border: 2px solid slategrey

    &:before
      content: 'PENCILS'
      width: 78px
      height: 70px
      margin-left: -7px
      margin-top: 50px
      padding-top: 20px
      z-index: 2
      background-color: white
      border-radius: 3px 3px 10px 10px
      border: 2px solid slategrey
      box-shadow: 0 3px 2px black(.2),
                  inset 0 -7px 2px black(.1),
                  inset -20px 0 2px black(.05)
      font-family: Helvetica, Arial
      font-size: 9px
      font-weight: bold
      letter-spacing: 1px
      color: lightgray
    
    &:after
      width: 8px
      height: 100px
      margin-left: 34px
      margin-top: -7px
      background-image: linear-gradient(to bottom, pink 10px,
                                                   silver 10px,
                                                   silver 16px,
                                                   palegoldenrod 16px)
      border-radius: 3px
      border: 2px solid slategrey
      box-shadow: 3px 6px 2px black(.2)
      transform: rotate(12deg)
              
            
!

JS

              
                
              
            
!
999px

Console