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 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

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

              
                .content
  .bear
    .ear.ear--left
    .ear.ear--right
    .nose
    .eye.eye--left
    .eye.eye--right

              
            
!

CSS

              
                $color = brown
*
  box-sizing border-box

body
  padding 40px

.content
  position fixed
  top 0
  right 0
  bottom 0
  left 0
  &:before
    box-sizing border-box
    content ''
    display inline-block
    height 200px
    width 200px
    border-radius 100%
    background linear-gradient(30deg, #27ae60, #2980b9, #e74c3c)
    z-index -1
    position absolute
    top 50%
    left 50%
    margin-left -100px
    margin-top -110px

  

.bear
  top 50%
  left 50%
  margin-left -72.5px
  margin-top -50px
  height 100px
  width  145px
  background-color $color
  border-top-left-radius 65px
  border-top-right-radius 65px
  border-bottom-left-radius 65px
  border-bottom-right-radius 65px
  position absolute
  animation nod 10s infinite linear
  z-index 2

.ear
  position absolute
  height 40px
  width 40px
  background-color $color
  border-top-left-radius 30px
  border-top-right-radius 30px
  border-bottom-left-radius 15px
  border-bottom-right-radius 15px
  transform rotate(-45deg)
  top -8px

.ear--left
  left -8px

.ear--right
  transform rotate(45deg)
  right -8px

.nose
  height 30px
  width 45px
  border 1px solid black
  position absolute
  top 50%
  left 50%
  margin-left -22.5px
  margin-top -5px
  border-radius 20px
  background-color #000
  &:after
    content ''
    height 40px
    width 10px
    background-color black
    display inline-block
    position absolute
    left 50%
    top 4px
    margin-left -5px
    border-radius 5px

.eye
  &--right
    height 20px
    width 20px
    background-color black
    border-radius 100%
    position absolute
    right 35px
    top 25px
    animation wink 10s infinite linear
  &--left
    height 20px
    width 20px
    background-color black
    border-radius 100%
    position absolute
    left 35px
    top 25px
    animation blink 10s infinite linear
@keyframes blink
  60% {
    transform scaleY(1)
  }
  62% {
    transform scaleY(.1)
  }
  64% {
    transform scaleY(1)
  }
@keyframes wink
  10% {
    transform scaleY(1)
  }
  15% {
    transform scaleY(.1)
  }
  20% {
    transform scaleY(1)
  }
  60% {
    transform scaleY(1)
  }
  62% {
    transform scaleY(.1)
  }
  64% {
    transform scaleY(1)
  }
@keyframes nod
   10% {
     transform rotate(0deg)
   }
   15% {
     transform rotate(15deg)
   }
   20% {
     transform rotate(0deg)
   }

              
            
!

JS

              
                
              
            
!
999px

Console