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

              
                .cup # coffee
  .coffee
              
            
!

CSS

              
                @import 'nib'
@import 'https://fonts.googleapis.com/css?family=Cousine'

cup = #e6e6e6
coffee = #532d09
smoke = rgba(#333, .2)

*, *::after, *::before
  box-sizing border-box
  
html, body
  height 100%
  display flex
  justify-content center
  align-items center
  flex-direction column
  font-family Cousine, monospace
.cup
  height 200px
  width 300px
  border-radius 0 0 150px 150px
  position relative
  background cup
  box-shadow inset 17px -7px 0 0 smoke
  display flex
  justify-content center
  align-items center
  color smoke
  user-select none
  cursor default
  &::before, &::after
    content ''
    position absolute
    display block
  &::before
    width 300px
    height 50px
    border-radius 50%
    top -24px
    left 0
    box-shadow  inset 3px 0 0 0 smoke, inset 0 0 0 4px cup, inset 0 14px 0 0 #d6d6d6
    z-index 1
  &::after
    width 100px
    height 100px
    border-radius 0 50% 50%
    right -100px + 25px
    top 0
    border 25px solid cup
    box-shadow inset 7px -7px 0 0 smoke, 3px -3px 0 0 smoke
    z-index -1
  .coffee
    position absolute
    width 300px - 2
    height 50px - 4
    top -22px
    left 0
    border-radius 50%
    background coffee
    &::before, &::after
      content ''
      position absolute
      display block
      background smoke
      border-radius 100px 0
      width 100px
      height 30px
      z-index 2
      opacity 0
    &::before
      animation smo 2s infinite
    &::after
      animation smo2 3s infinite
@keyframes smo
  0%
    opacity 0
    transform rotateZ(-45deg)
    top -20px
    left 10px
  65%
    opacity 1
  100%
    transform rotateZ(-45deg)
    opacity 0
    top -100px
    left 100px
@keyframes smo2
  0%
    opacity 0
    transform rotateZ(-45deg)
    top -20px
    left 110px
  65%
    opacity 1
  100%
    transform rotateZ(-45deg)
    opacity 0
    top -100px
    left 200px
              
            
!

JS

              
                # css coffee cup
# by wvffle
              
            
!
999px

Console