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

              
                .dog
 .face
  .inner
 .weiner
 .ends
 .bun
 .condiments
 .condiments.ketchup
              
            
!

CSS

              
                $p: #d37979;
$t: rgba(255,255,255,0);
$w: #fff;
$bun: #f5e3be;
$y: #fadc0b;
$r: #ce0010;

body{
  display:flex;
  width:100%;
  height:100vh;
  align-items:center;
  justify-content:center;
  background: radial-gradient(to center, #96DEDA 30%, #50C9C3 100%);
  .dog{
    width:200px;
    height:400px;
    position:relative;
    margin-left:100px;
    &:before{
      content:'';
      position:absolute;
      width:10px;
      height:10px;
      background:$w;
      z-index:3;
      left:10px;
      top:85px;
      opacity:0.15;
      border-radius:100%;
    }
    &:after{
      content:'';
      position:absolute;
      width:100%;
      height:100%;
      background:rgba(0,0,0,0.05);
      top:0px;
      left:-100px;
      z-index:-5;
      border-radius:100px;
    }
    .face{
      position:absolute;
      width:55px;
      height:30px;
      z-index:4;
      left:40px;
      top:55px;
      .inner{
        position:absolute;
        top:0;
        left:0;
        width:55px;
        height:30px;
        z-index:4;
        transform-origin:50% 0%;
        border-radius:10px 10px 100px 100px;
        overflow:hidden;
        &:before{
          content:'';
          position:absolute;
          width:10px;
          height:10px;
          bottom:0;
          left:40px;
          background:$y;
          border-radius:100%;
          box-shadow:-25px 5px 0 $r;
          animation:appear 0.15s linear 1 forwards;
          animation-delay:2s;
          transform:scaleY(0);
          transform-origin:50% 100%;
          @keyframes appear{
            0%{
              transform:scaleY(0);
            }
            100%{
              transform:scaleY(1);
            }
          }
        }
      }
      &:after{
        content:'';
        position:absolute;
        width:10px;
        height:10px;
        background:darken($p, 50%);
        top:-30px;
        left:10px;
        border-radius:100%;
        box-shadow:30px 0 0 darken($p, 50%);
        animation:blink 5s linear infinite;
        @keyframes blink{
          0%{
            transform:scaleY(1) scaleX(1);
          }
          80%{
            transform:scaleY(1) scaleX(1);
          }
          81.5%{
            transform:scaleY(0.25) scaleX(1);
          }
          82.5%{
            transform:scaleY(1) scaleX(1);
          }
        }
      }
      &:before{
        content:'';
        position:absolute;
        top:0;
        left:0;
        width:55px;
        height:30px;
        background:darken($p, 50%);
        z-index:4;
        transform-origin:50% 0%;
        border-radius:10px 10px 100px 100px;
        animation:smile 2s ease-in 1 forwards;
        @keyframes smile{
          0%{
            transform:scaleY(0.15);
            border-radius:5px;
          }
          75%{
            transform:scaleY(0.15);
            border-radius:5px;
          }
          100%{
            transform:scaleY(1);
            border-radius:10px 10px 100px 100px;
          }
        }
      }
      
    }
    .bun{
      height:400px;
      width:150px;
      background:$bun;
      box-shadow:inset 50px 0 0 $bun, inset 80px 0 0 lighten($bun, 5%);
      position:absolute;
      top:0;
      left:-75px;
      z-index:-1;
      border-radius:100px 0 0 100px;
      &:after{
        content:'';
        position:absolute;
        width:100px;
        height:400px;
        background:$bun;
        left:125px;
        z-index:-2;
        border-radius:0 300px 200px 200px;
        box-shadow:inset -30px 10px 0 $bun, inset -80px 0 0 lighten($bun, 5%);
      }
    }
    .condiments{
      &:after{
        content:'';
        position:absolute;
        width:6.5px;
        height:7px;
        background:$y;
        top:150px;
        left:26.25px;
        border-radius:0 0 50px 50px;
        animation:drip 2s linear infinite alternate;
        animation-delay:3s;
        transform-origin:50% 0%;
        transform:scaleY(0);
        @keyframes drip{
          0%{
            transform:scaleY(1);
          }
          100%{
            transform:scaleY(3);
          }
        }
      }
      &.ketchup{
        left:30px;
        top:80px;
        height:0;
        transform:scaleX(1);
        &:after{
          background:$r;
        }
        &:before{
          background: 
radial-gradient(circle at 100% 50%, transparent 20%, $r 21%, $r 34%, transparent 35%, transparent),
radial-gradient(circle at 0% 50%, transparent 20%, $r 21%, $r 34%, transparent 35%, transparent) 0 -25px;
          background-color: $t;
          background-size:37.5px 50px;
        }
      }
      width:34px;
      height:0px;
      position:absolute;
      top:65px;
      left:65px;
      overflow:hidden;
      animation:mustarding 3s ease-in 1 forwards;
      animation-delay:1.995s;
      transform:scaleX(-1);
      @keyframes mustarding{
        0%{
          height:0px;
        }
        50%{
          height:160px;
        }
        100%{
          height:190px;
        }
      }
      &:before{
        content:'';
        position:absolute;
        width:60px;
        height:150px;
        left:-20px;
        top:0;
        background: 
radial-gradient(circle at 100% 50%, transparent 20%, $y 21%, $y 34%, transparent 35%, transparent),
radial-gradient(circle at 0% 50%, transparent 20%, $y 21%, $y 34%, transparent 35%, transparent) 0 -25px;
      background-color: $t;
      background-size:37.5px 50px;
      position:absolute;
      }
    }
    .ends{
      position:absolute;
      width:100px;
      height:100px;
      border-radius:100%;
      background:$p;
      left:45px;
      bottom:-7.5px;
      box-shadow:-45px -350px 0px 0.25px $p;
      &:before, &:after{
        content:'';
        position:absolute;
        width:25px;
        height:25px;
        background:linear-gradient(to right, $t, $t 12px, darken($p, 10%) 12px, darken($p, 10%) 14px, $t 14px), linear-gradient(to bottom, $t, $t 12px, darken($p, 10%) 12px, darken($p, 10%) 14px, $t 14px), linear-gradient(45deg, $t, $t 16px, darken($p, 10%) 16px, darken($p, 10%) 18px, $t 18px), linear-gradient(-45deg, $t, $t 14px, darken($p, 10%) 14px, darken($p, 10%) 16px, $t 16px);
        border-radius:100%;
        right:20px;
        bottom:30px;
      }
      &:after{
        bottom:auto;
        top:-350px;
        left:-10px;
        transform:scaleY(0.5) scaleX(1.25);
      }
    }
    .weiner{
      position:relative;
      width:200px;
      height:400px;
      overflow:hidden;
      &:before{
        content:'';
        position:absolute;
        width:10px;
        height:150px;
        left:10px;
        background:$w;
        z-index:3;
        top:100px;
        border-radius:20px;
        opacity:0.15;
      }
      &:after{
        content:'';
        position:absolute;
        width:200px;
        height:450px;
        border:100px solid;
        border-radius:500px;
        border-color:$t $t $t $p;
        left:0;
        top:-200px;
      }
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console