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

              
                .bg
.bojack
  .bojack__hair.bojack__hair--top-1
  .bojack__hair.bojack__hair--top-2
  .bojack__hair.bojack__hair--top-3
  .bojack__hair.bojack__hair--top-4
  .bojack__hair.bojack__hair--left-1
  .bojack__hair.bojack__hair--left-2
  .bojack__hair.bojack__hair--right-1
  .bojack__base
  .bojack__ear-left
  .bojack__ear-right
    .bojack__ear-line
  .bojack__forehead
  .bojack__forehead-square
  .bojack__eyebrows
  .bojack__eye.bojack__eye--left
  .bojack__eye.bojack__eye--right
  .bojack__crown
  .bojack__neck
  .bojack__nose
    .bojack__snout
    .bojack__nostrils
    .bojack__nostril-left
    .bojack__nostril-right
    .bojack__nose-filler
    .bojack__chin
      .bojack__chin--1
      .bojack__chin--2
      .bojack__chin--3
    .bojack__mouth
    .bojack__triangle
      .bojack__triangle-inner
        .bojack__nose-splodge.bojack__nose-splodge--1
        .bojack__nose-splodge.bojack__nose-splodge--2
        .bojack__nose-splodge.bojack__nose-splodge--3
        .bojack__nose-splodge.bojack__nose-splodge--4
        .bojack__nose-splodge.bojack__nose-splodge--5
  .bojack__chest
              
            
!

CSS

              
                *
*:after
*:before
  box-sizing border-box
  content ''

*:before
*:after
  position absolute

body
  min-height 100vh
  background radial-gradient(circle at 50%, #a537fd, transparent), #663399
  padding 0
  margin 0
  display flex
  align-items center
  justify-content center
  overflow hidden

$stroke = 2px
$brown = #8b5347

.bojack
  height 300px
  width 300px
  position relative
  transition transform .25s ease

  @media(min-width 768px) and (min-height 550px)
    transform scale(1.75)

  *
    position absolute

  &__ear-left
    height 65px
    width 25px
    border $stroke solid black
    left 50%
    top 2px
    transform translate(-47px, 0)
    z-index 4
    background $brown
    border-radius 10px 15px 1px 15px/32px 64px 1px 30px
    $clip = polygon(0 0, 0 65px, 12px 65px, 15px 60px, 23px 46px, 25px 47px, 25px 0)
    clip-path $clip
    -webkit-clip-path $clip

    &:before
      height 47px
      width 20px
      left -7px
      top 11px
      border $stroke solid black
      border-radius 1px 12px 10px 1px / 1px 32px 19px 1px
      $clip = polygon(13px 6px, 20px 0, 20px 47px, 15px 43px)
      clip-path $clip
      -webkit-clip-path $clip

  &__ear-right
    top 5px
    z-index 4
    left 50%

    &:before
      height 66px
      width 28px
      border $stroke solid black
      transform translate(19px, 0)
      background $brown
      border-radius 20px 1px 1px 1px/58px 1px 1px 1px
      $clip = polygon(0 0, 20px 0, 20px 4px, 20px 80%, 0 100%)
      clip-path $clip
      -webkit-clip-path $clip

    &:after
      background $brown
      height 71px
      width 28px
      transform translate(19px, -3px)
      border 2px solid black
      border-radius 1px 13px 26px 1px/1px 50px 22px 1px
      $clip = polygon(19px 3px, 20px 90%, 100% 100%, 100% 12px)
      clip-path $clip
      -webkit-clip-path $clip

  &__hair
    background black

    &:after
    &:before
      background black

    &--left-1
      height 10px
      width 10px
      left 50%
      top 50%
      transform translate(-49px, -45px) rotate(10deg)

      &:before
        height 5px
        width 20px
        top -2px
        left -5px
        border-radius 100%
        transform translate(-2px, 0px) rotate(50deg)

      &:after
        height 5px
        width 20px
        top -15px
        left -9px
        border-radius 100%
        transform translate(-2px, 0) rotate(62deg)

    &--left-2
      height 55px
      width 9px
      left 50%
      top 50%
      border-radius 100%
      transform translate(-46px, -87px) rotate(-12deg)

      &:before
        height 20px
        width 20px
        top -5px
        left 8px
        transform rotate(12deg)

      &:after
        background black
        width 6px
        height 22px
        border-radius 100%
        transform translate(53px, -37px) rotate(-41deg)


    &--top-1
      left 50%
      top 10%
      height 63px
      width 8px
      z-index 3
      border-radius 100%
      transform translate(-5px, -14px) rotate(17deg)

      &:before
        height 30px
        width 6px
        border-radius 100%
        transform rotate(-20deg) translate(0px, 20px)

      &:after
        border-radius 100%
        height 56px
        width 10px
        transform rotate(-22deg) skewY(10deg) translate(8px, 9px)

    &--top-2
      left 50%
      top 10%
      z-index 3
      height 20px
      width 8px
      border-radius 1px 1px 30px 10px/1px 1px 56px 36px
      transform translate(-22px, 5px) rotate(10deg)

      &:after
        height 17px
        width 44px
        transform rotate(-23deg) translate(-1px, -9px)

      &:before
        height 50px
        width 9px
        border-radius 1px 1px 8px 5px/1px 1px 35px 35px
        transform translate(8px, -17px) rotate(1deg)
        $clip = inset(15% 0 0 0)
        clip-path $clip
        -webkit-clip-path $clip

    &--top-3
      left 50%
      top 10%
      z-index 6
      height 23px
      width 7px
      border-radius 7px 1px 1px 7px/9px 1px 1px 11px
      transform translate(-14px, -13px) rotate(90deg) skewY(25deg)

      &:before
        background black
        width 12px
        height 18px
        border-radius 100%
        transform skewY(-25deg) translate(5px, -25px) rotate(12deg)

      &:after
        width 7px
        height 24px
        border-radius 8px 1px 1px 8px/15px 1px 1px 22px
        transform skewY(-25deg) translate(-1px, -23px) rotate(-12deg)


    &--top-4
      left 50%
      top 10%
      height 48px
      width 9px
      z-index 6
      border-radius 1px 1px 9px 3px/1px 1px 20px 21px
      transform rotate(-8deg) translate(5px, 5px)

      &:after
        height 42px
        width 8px
        border-radius 1px 1px 6px 3px/1px 1px 20px 16px
        transform rotate(-10deg) translate(8px, 1px)

      &:before
        height 32px
        width 8px
        background black
        border-radius 100%
        transform rotate(-20deg) translate(13px, -1px)

    &--right-1
      left 50%
      top 50%
      width 8px
      height 30px
      border-radius 100%
      transform translate(41px, -97px) rotate(11deg)

      &:before
        height 30px
        width 6px
        border-radius 2px 3px 1px 1px/10px 20px 1px 1px
        top 16px
        left 6px
        transform rotate(7deg)

      &:after
        height 20px
        width 4px
        top 27px
        left 12px
        transform rotate(-29deg)
        $clip = polygon(0 0, 100% 0, 100% 54%, 0 91%)
        clip-path $clip
        -webkit-clip-path $clip

  &__ear-line
    height 47px
    width 10px
    border $stroke solid black
    transform translate(30px, 11px)
    border-radius 15px 1px 1px 15px/45px 1px 1px 35px
    $clip = polygon(0 0, 4px 8px, 6px 100%, 0 100%)
    clip-path $clip
    -webkit-clip-path $clip

  &__chin
    width 60px
    height 60px
    top 50%
    left 50%
    transform translate(-50%, 48px)
    z-index 4

    &--1
      height 100%
      width 100%
      border $stroke solid black
      border-radius 1px 1px 30px 32px/1px 1px 34px 38px
      $clip = polygon(0 40px, 60px 45px, 60px 60px, 0 60px)
      clip-path $clip
      -webkit-clip-path $clip

    &--2
      height 20px
      width 23px

      top 50%
      left 50%
      transform translate(-33px, -10px) rotate(-65deg)
      border $stroke solid black
      border-radius 11px 1px 1px 1px/13px 1px 1px 1px
      $clip = polygon(0 0, 70% 0, 0% 63%)
      clip-path $clip
      -webkit-clip-path $clip

    &--3
      height 40px
      width 30px
      border $stroke solid black

      top 50%
      left 50%
      border-radius 0px 16px 1px 1px/0px 26px 1px 1px
      transform translate(-1px, -15px) rotate(84deg)
      $clip = polygon(6px 0, 30px 15px, 30px 0)
      clip-path $clip
      -webkit-clip-path $clip

  &__base
    width 108px
    background $brown
    height 80px
    left 50%
    top 47%
    transform translate(-50%, -50%)
    border-radius 20px 14px 36px 36px / 30px 30px 40px 40px
    border $stroke solid black
    z-index 2

    &:after
      background $brown
      width 94px
      height 20px
      top -4px
      left 6px

  &__crown
    width 100px
    height 40px
    left 50%
    top 20%
    transform translate(-49px, 3px)
    border-radius 8px 10px 9px 14px / 26px 19px 20px 27px
    background $brown
    border $stroke solid black
    opacity 0

  &__forehead
    width 100px
    height 40px
    left 50%
    top 20%
    transform translate(-49px, 14px)
    border-radius 8px 10px 9px 9px / 26px 19px 20px 27px
    background $brown
    border $stroke solid black

    &:before
      content ''
      background $brown
      border-left $stroke solid black
      height 42px
      width 57px
      top -34px
      left 7px
      transform rotate(16deg)

    &:after
      content ''
      background $brown
      border-right $stroke solid black
      height 42px
      width 57px
      top -34px
      left 32px
      transform translate(5px, 14px) rotate(-14deg)

  &__forehead-square
    height 55px
    width 25px
    background black
    top 73px
    left 138px
    z-index 6
    $clip = polygon(49% 0, 100% 54%, 55% 100%, 0 53%)
    clip-path $clip
    -webkit-clip-path $clip

    &:after
      background white
      clip-path $clip
      -webkit-clip-path $clip
      height 100%
      width 100%
      transform scale(0.86)

  &__eyebrows
    z-index 6
    height 2px
    width 17px
    top 90px
    left 107px
    background black
    transform rotate(-8deg)

    &:after
      height 2px
      width 17px
      top 9px
      left 70px
      background black
      transform rotate(19deg)

  &__eye
    background white
    border $stroke solid black
    z-index 7

    &--left
      height 21px
      width 21px
      border-radius 100%
      top 102px
      left 104px

      &:before
        background black
        border-radius 100%
        height 7px
        width 7px
        top 50%
        left 50%
        transform translate(-50%, -43%)

      &:after
        height 30px
        width 30px
        border 5px double black
        border-radius 100%
        top -3px
        left -6px
        $clip = polygon(13px 20px, 26px 17px, 30px 30px, 21px 27px, 11px 27px)
        clip-path $clip
        -webkit-clip-path $clip

    &--right
      height 20px
      width 20px
      border-radius 100%
      top 101px
      left 178px

      &:before
        background black
        border-radius 100%
        height 7px
        width 7px
        top 50%
        left 50%
        transform translate(-50%, -43%)

      &:after
        height 30px
        width 30px
        border 5px double black
        border-radius 100%
        top -6px
        left -9px
        transform-origin bottom left
        transform rotate(4deg)
        $clip = polygon(5px 20px, 21px 24px, 22px 26px, 7px 30px)
        clip-path $clip
        -webkit-clip-path $clip

  &__nose
    top 50%
    left 50%
    transform translate(-50%, -50%)
    z-index 3

  &__snout
    width 58px
    height 90px
    background $brown
    top 50%
    left 50%
    transform translate(-49%, -25%)
    border-radius 4px 6px 5px 8px/30px 40px 18px 50px
    border $stroke solid black
    $clip = polygon(0 12%, 100% 12%, 100% 82%, 0 76%)
    clip-path $clip
    -webkit-clip-path $clip

  &__nose-filler
    height 10px
    width $stroke
    background black
    top 50%
    left 50%
    transform translate(-30px, 45px) rotate(17deg)
    transform-origin bottom

  &__nostrils
    background $brown
    height 25px
    width 68px
    top 50%
    left 50%
    transform translate(-47%, 50px)
    z-index 2
    border $stroke solid black
    border-radius 7px 10px 4px 6px/11px 12px 9px 14px
    $clip = polygon(0px 2px, 8px 4px, 59px 15px, 60px 0px, 100% 0, 100% 100%, 65px 100%, 63px 17px, 7px 17px, 0 100%, 0 0)
    clip-path $clip
    -webkit-clip-path $clip

  &__nostril-left
    height 14px
    width 13px
    background black
    top 50%
    left 50%
    transform translate(-50%, -50%) translate(-19px, 64px)
    z-index 12
    border-radius 7px 14px 1px 8px/12px 18px 1px 8px

    &:before
      content ''

      background black
      height 10px
      width 9px
      top 10px
      left 4px
      border-radius 100%

    &:after
      content ''

      border $stroke solid black
      height 25px
      width 20px
      border-radius 1px 7px 7px 1px/1px 16px 13px 1px
      $clip = polygon(16px 0, 16px 3px, 20px 0px, 20px 25px, 15px 21px)
      clip-path $clip
      -webkit-clip-path $clip

  &__nostril-right
    height 12px
    width 14px
    background black
    top 50%
    left 50%
    transform translate(-50%, -50%) translate(22px, 66px)
    z-index 12
    border-radius 15px 6px 9px 1px/17px 7px 10px 1px

    &:before
      content ''

      background black
      height 10px
      width 11px
      top 9px
      left 0px
      border-radius 2px 7px 8px 7px/2px 4px 7px 11px

    &:after
      content ''

      border $stroke solid black
      height 25px
      width 20px
      top -3px
      left -8px
      border-radius 7px 1px 1px 7px/14px 1px 1px 14px
      $clip = polygon(0 0, 5px 4px, 5px 23px, 0 30px)
      clip-path $clip
      -webkit-clip-path $clip

  &__neck
    width 110px
    background $brown
    top 50%
    left 50%
    transform translate(-48%, 0%) rotate(1deg)
    height 100px
    // border-right 8px solid black
    $clip = polygon(0 0, 95% 0, 101% 93%, 85% 100%, 0 90%)
    clip-path $clip
    -webkit-clip-path $clip
    z-index 1

    &:before
      content ''

      left 0
      height 74%
      top 0
      width $stroke
      background black

    &:after
      content ''

      width $stroke
      height 74%
      top 0
      right 3px
      background black
      transform rotate(-4deg)
    // border-left 2px solid black

  &__triangle
    height 103px
    width 44px
    background white
    z-index 5
    top 50%
    left 50%
    transform translate(-21px, -5px)
    background black
    $clip = polygon(22px 0, 44px 80px, 44px 103px, 0px 104px, 1px 80px, 21px 0)
    clip-path $clip
    -webkit-clip-path $clip
    border-radius 1px 1px 23px 20px/1px 1px 18px 25px
    overflow hidden

  &__triangle-inner
    background white
    height 100%
    width 100%
    border-radius 1px 1px 23px 20px/1px 1px 18px 25px
    transform scale(1)
    border $stroke solid black
    $clip = polygon(50% 5px, 24px 15px, 110% 100%, -5% 100%)
    clip-path $clip
    -webkit-clip-path $clip
    overflow hidden

  &__nose-splodge
    background #e5aed1
    border-radius 100%

    &--1
      height 47px
      width 12px
      bottom -7px
      left 32%

    &--2
      height 45px
      width 10px
      bottom -6px
      left 16%

    &--3
      height 46px
      width 10px
      bottom -5px
      left 2%

    &--4
      height 60px
      width 11px
      bottom -22px
      left 54%

    &--5
      height 60px
      width 11px
      bottom -20px
      left 74%

  &__chest
    width 125px
    height 65px
    background $brown
    top 50%
    left 50%
    transform translate(-50%, 65px)
    border $stroke solid black
    border-radius 10px 10px 60px 60px / 10px 10px 60px 60px

  &__mouth
    width 44px
    height 44px
    z-index 11
    top 50%
    left 50%
    transform translate(-48%, 54px)

    &:after
      content ''

      height 20px
      width 20px
      left 50%
      top 50%
      border $stroke solid black
      transform translate(-35px, 4px) rotate(41deg)
      border-radius 4px 12px 1px 1px/4px 14px 1px 1px
      $clip = polygon(0 4px, 100% 3px, 100% 0, 0 0)
      clip-path $clip
      -webkit-clip-path $clip

    &:before
      content ''

      height 20px
      width 20px
      left 50%
      top 50%
      border $stroke solid black
      transform translate(16px, 4px) rotate(-41deg)
      border-radius 14px 7px 1px 1px/20px 7px 1px 1px
      $clip = polygon(50% 0, 50% 50%, 100% 17%, 100% 0)
      clip-path $clip
      -webkit-clip-path $clip
              
            
!

JS

              
                // 🐴
              
            
!
999px

Console