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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                
        <link
      href="https://fonts.googleapis.com/css2?family=Gloria+Hallelujah&display=swap"
      rel="stylesheet"
    />
        <div class="crease-yourself">
      <div class="corners">
        <div class="top-left"></div>
        <div class="top-right"></div>
        <div class="bottom-left"></div>
        <div class="bottom-right"></div>
      </div>
      <p>Will you crease yourself and be reborn, like me?</p>
      <div class="pointer">
        <div class="segment"></div>
        <div class="segment-two"></div>
        <div class="segment-three"></div>
      </div>
    </div>
    <div class="container">
      <div class="crown"></div>
      <div class="hair">
        <div class="left"></div>
        <div class="right"></div>
      </div>
      <div class="hair">
        <!-- duped for the shadow -->
        <div class="left"></div>
        <div class="right"></div>
      </div>
      <div class="side-fringe">
        <div class="left"></div>
        <div class="right"></div>
      </div>
      <div class="mullee">
        <div class="left"></div>
        <div class="right"></div>
      </div>
      <div class="face">
        <div class="jewel"></div>
        <div class="jewel"></div>
        <div class="left"></div>
        <div class="right"></div>
      </div>
      <div class="👀">
        <div class="left"></div>
        <div class="right"></div>
      </div>
      <div class="👗">
        <div class="bust">
          <div class="jewel"></div>
          <div class="left"></div>
          <div class="right"></div>
        </div>
        <div class="side-flowy-bit">
          <div class="left"></div>
          <div class="right"></div>
        </div>
        <div class="flowy-bit">
          <div class="left"></div>
          <div class="right"></div>
        </div>
        <div class="waist">
          <div class="left"></div>
          <div class="right"></div>
        </div>
      </div>
      <div class="shoulders">
        <div class="left"></div>
        <div class="right"></div>
      </div>
      <div class="arms">
        <div class="left"></div>
        <div class="right"></div>
      </div>
      <div class="arms">
        <!-- duped for the shadow -->
        <div class="left"></div>
        <div class="right"></div>
      </div>
      <div class="jayphen">by Jayphen</div>
    </div>
              
            
!

CSS

              
                // would love to use css custom properties, but I wanted to use
// sass colour functions!
$color-bg: #736c7b;
$color-skin: #f5d2b9;
$color-crown: #e58f35;
$color-hair: #E4C93A;
$color-dress: #f3a6d2;
$color-dress-hems: #f77db8;
$color-jewel: #0096cb;
$debug: 1px solid red;

body {
  background: $color-bg;
  font-size: 13px;

  /* 
    * I probably should have made this responsive with % values
    * But I never actually thought I'd actually finish doing this 
  */
  @media screen and (max-width: 500px) {
    font-size: 6px; 
  }
  @media screen and (max-width: 600px) {
    font-size: 8px; 
  }
  @media screen and (max-width: 800px) {
    font-size: 10px; 
  }
}
body, html, div {
  margin: 0;
	padding: 0;
	border: 0;
  vertical-align: baseline;
  font-family: "Gloria Hallelujah", "Comic Sans MS", cursive, sans-serif;
}

* { box-sizing: content-box; }


.crease-yourself {
  position: relative;
  width: 56ch;
  margin: 0 auto;
  z-index: 10;
}
p {
  padding: 2em 1em;
  background: linear-gradient(90deg, rgba(255,255,255,0.5) 0%, rgba(218,218,211,0.5) 50%, rgba(198,199,191,0.5) 51%, rgba(216,214,210,0.5) 100%), 
  linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(218,218,211,0.5) 50%, rgba(198,199,191,0.5) 51%, rgba(216,214,210,0.5) 100%), #fff;
  color: #484841;
  font-size: 1.5em;
  border-radius: 0.25em;
  margin-top: 2em;
  position: relative;
  box-shadow: 0 0 0.5em rgba(0,0,0,0.3);
  &:after {
    position: absolute;
    z-index: -1;
    background: #8a978b;
    content: "";
    left: -0.5em;
    right: -0.5em;
    top: -0.5em;
    bottom: -0.5em;
    border-radius: 2.2em;
  }
}

.corners {
  // reminds me of using transparent gifs for rounded corners
  // back in the day 😓
  $color: #8a978b;
  --corner-size: 1.7em;
  > * {
    border-left: var(--corner-size) solid lighten($color, 3%);
    border-bottom: calc(var(--corner-size) * 1.4) solid transparent;
    border-top: calc(var(--corner-size) * 1.4) solid transparent;
    position: absolute;
    transform: rotate(226deg);
    top: -2.1em;
    left: -0.5em;
    z-index: 10;
    box-shadow: -0.5em 0 9px -10px rgba(0,0,0,0.5);
  }
  .bottom-left {
    top: calc(100% - var(--corner-size ) * 1.53);
    transform: rotate(134deg);
  }
  .bottom-right {
    left: auto;
    right: -0.5em;
    top: calc(100% - var(--corner-size ) * 1.53);
    transform: rotate(46deg);
  }
  .top-right {
    left: auto;
    right: -0.5em;
    transform: rotate(-46deg);
  }
}

.pointer {
  --size: 2.4em;
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  .segment {
    border-left: var(--size) solid white;
    border-bottom: var(--size) solid transparent;
    position: absolute;
    right: 14%;
    top: calc(100% - var(--size) / 1.5);
    box-shadow: -0.2em -0.6em 9px -7px rgba(0,0,0,1);
  }
  .segment-two {
    --size: 1.7em;
    border-left: var(--size) solid white;
    border-bottom: var(--size) solid transparent;
    position: absolute;
    right: 23%;
    top: calc(100% - var(--size) / 1.40);
    box-shadow: -0.2em -0.6em 9px -7px rgba(0,0,0,0.5);
    transform: rotate(-173deg) scaleX(1.8);
    z-index: -1;
  }
  .segment-three {
    --size: 1.3em;
    border-left: var(--size) solid white;
    border-bottom: var(--size) solid transparent;
    position: absolute;
    right: 27%;
    bottom: -2.4em;
    box-shadow: 0.0em -0.4em 9px -8px rgba(0,0,0,1);
    transform: rotate(277deg) scaleX(-2.2);
    z-index: -2;
  }
}

.container {
  opacity: 1;
  position: relative;  
  width: 38.5em;
  margin: 0 auto;
  height: 70em;
}

@keyframes crown-sway {
  from, to {
    transform: scaley(1)
  }
  49%, 50% {
    transform: scaley(1.1)
  }
}


.crown {
  top: 0.5em;
  animation: crown-sway
    2s
    infinite;

  position: relative;
  color: $color-crown;
  width: 0;
  height: 0;
  border-bottom: 8em solid currentColor;
  border-left: calc(15em / 2) solid transparent;
  border-right: calc(15em / 2) solid transparent;
  margin: 0 auto;

  &:before, &:after {
    color: adjust-color($color-crown, $lightness: -2%, $saturation: -10%);
    width: 0;
    height: 0;
    content: "";
    z-index: -1;
  }

  &:before {
    border-bottom: 6.85em solid currentColor;
    border-right: calc(22.7em / 2) solid transparent;
    left: -7.5em;
    top: 1.2em;
    position: absolute;
  }

  &:after {
    border-bottom: 6.85em solid currentColor;
    border-left: calc(22.7em / 2) solid transparent;
    right: 3.5em;
    top: -0.6em;
    position: relative;
  }
}

.hair {
   top: 8.5em;
   position: absolute;
   width: 20em;
   left: 25%;

  .left, .right {
    color: $color-hair;
    position: absolute;
    left: -1.5em;
    top: 0;
    border-bottom: 2em solid currentColor;
    border-left: 1.5em solid transparent;
    width: 9.5em;
    height: 0em;
    &:before {
      content: "";
      position: absolute;
      top: 2em;
      border-top: 9em solid currentColor;
      border-left: 11em solid transparent;
      background: transparent;
      left: -1.5em;
      width: 0em;
    }
    &:after {
      content: "";
      position: absolute;
      top: 0;
      right: -4px;
      width: 4px;
      color: adjust-color($color-hair, $lightness: 5%);
      background: currentColor;
      height: 11em;
      z-index: 10;
    }
  }
  .right {
    color: adjust-color($color-hair, $lightness: 5%, $saturation: 3%);
    left: 50%;
    transform: scaleX(-1);
    &:after {
    color: $color-hair;
      background: currentColor;
    }
  }
  + .hair {
    top: 9em;
    z-index: -1;
    .left, .right, .left:after, .right:after, .left:before, .right:before {
      color: adjust-color($color-hair, $lightness: -20%, $saturation: -50%, $alpha: -0.8);
      filter: blur(4px);
    }
  }
}

.side-fringe {
  position: absolute;
  top: 11em;
  width: 100%;
  z-index: -2;

  .left, .right {
  --hair-size: calc(8.2em/2);
  color: $color-hair;
  background: currentColor;
  border-left: var(--hair-size) solid lighten($color-hair, 15%);
  border-right: var(--hair-size) solid darken($color-hair, 8%);
  border-top: var(--hair-size) solid lighten($color-hair, 5%);
  border-bottom: calc(var(--hair-size) + 0.5em) solid $color-hair;
  border-radius: 2px;
  position: absolute;
  transform: rotate(39deg) skew(-17deg);
  left: 4em;
  z-index: -1;
  box-shadow: 0.4em 0.5em 0.8em rgba(0,0,0,0.1);
  }
  .right {
    left: auto;
    right: 4em;
  transform: rotate(-36deg) skew(17deg) scaleX(-1);
  }
}

.mullee {
  position: absolute;
  top: 18em;
  color: adjust-color($color-hair, $lightness: -15%, $saturation: -15%);
  width: 100%;
  z-index: -4;
  .left, .right {
    border-left: 15em solid transparent;
    border-right: 15em solid transparent;
    border-bottom: 7em solid currentColor;
    transform: rotate(-103deg) translateX(-7em) translateY(-11em) skew(-20deg);
    position: absolute;
    &:after {
      content: "";
      position: absolute;
      left: 2em;
      top: -3em;
      background: currentColor;
      width: 6em;
      height: 22em;
    transform: rotate(90deg) skew(-10deg);
    }
  }
  .right {
    right: 0;
    transform: scaleY(-1) rotate(77deg) translateX(-7em) translateY(-11em) skew(-20deg);
  }
}

.face {

  top: 14em;
  position: absolute;
  left: 23.5%; 
  width: 21em;
  .left, .right {
    position: absolute;
    color: $color-skin;
    width: 0em;
    height: 1.5em;
    border-right: 10em solid currentColor;
    border-top: 4.5em solid currentColor;
    border-bottom: 31em solid transparent;
    z-index: -3;
    &:after {
      content: "";
      position: absolute;
      top: 0;
      left: 10em;
      width: 4px;
      color: adjust-color($color-skin, $lightness: 2%);
      background: currentColor;
      height: 11em;
      z-index: 10;
    }
  }
  .right {
    color: adjust-color($color-skin, $lightness: 4%, $saturation: 15%);
    transform: scaleX(-1);
    left: 50%;
    &:after {
      color: $color-skin;
      background:currentColor;
    }
  }

}

@keyframes blink {
  from, to {
    transform: scaleY(1)
  }
  48%, 51% {
    transform: scaleY(1)
  }
  49%, 50% {
    transform: scaleY(.2)
  }
}
.👀 {
  position: absolute;
  top: 19.6em;
  height: 4.45em;
  width: 10em;
  opacity: 0.7;
  left: 14.25em;
  .left, .right {
    position: absolute;
    border-radius: 3px;
    width: 2em;
    height: 4.2em;
    background: black;
    animation: blink
      4s
      infinite;
  }
  .right {
    right: 0;
  }
}

:root {
  --dress-top: 27.5em;
}

@keyframes dress-sway {
  from, to {
    transform: scaleY(1)
  }
  49%, 50% {
    transform: scaleY(1.05)
  }
}
.👗 {

  z-index: -3;
  position: absolute;
  height: 13em;
  width: 16.15em;
  top: var(--dress-top);
  left: 11.25em;
  .bust {
    .left, .right {
  
      animation: dress-sway
        5s
        infinite;
      border-radius: 2px 0 0 5em;
      position: absolute;
      color: $color-dress;
      width: 50%;
      height: 100%;
      background: currentColor; 
      border-right: 1px solid adjust-color($color: $color-dress, $lightness: 5%, $saturation: 5%);
      border-left: none;
      &:before {
        width: 100%;
        position: absolute;
        top: -2px;
        background: black;
        height: 1px;
      }
    }
    .right {
      right: 0;
      color: adjust-color($color-dress, $lightness: 3%);
      border-left: 1px solid adjust-color($color: $color-dress, $lightness: 5%, $saturation: 5%);
      border-right: none;
      border-radius: 0 2px 5em 0;
    }
  }
  .flowy-bit {
    position: absolute;
    left: -3em;
    width: 22em;
    .left, .right {
      color: $color-dress;
      position: absolute;
      top: 12.5em;
      height: 3em;
      border-left: 0em solid transparent;
      border-right: 11em solid currentColor;
      border-bottom: 10em solid currentColor;
      border-top: 7em solid transparent;
      &:after {
        content: "";
        position: absolute;
        height: 13em;
        width: 4px;
        left: -0.3em;
        filter: blur(2px);
        background: rgba(0,0,0,0.2);
        z-index: -1;
      }
      &:before {
        content: "";
        color: $color-dress-hems;
        position: absolute;
        bottom: -11em;
        left: -0.6em;
        width: 11.56em;
        // height: 2.2em;
        transform: rotate(6deg);
        border-bottom: 2.2em solid currentColor;
        border-right: 0.21em solid transparent;
      }
      &.left:before {
        border-left: 0.23em solid transparent;
        border-right: 0;
      }
    }
    .right {
      color: adjust-color($color-dress, $lightness: 3%);
      transform: scaleX(-1);
      right: 0;
      &:before {
        color: adjust-color($color-dress-hems, $lightness: 3%);
        z-index: 0;
      }
    }
  }
  .side-flowy-bit {
    @keyframes hem-sway-left {
      from, to {
        transform: rotate(21deg);
      }
      49%, 51% {
        transform: rotate(17deg)
      }
    }
    @keyframes hem-sway-right {
      from, to {
        transform: rotate(-20deg) scaleX(-1);
      }
      49%, 51% {
        transform: rotate(-16deg) scaleX(-1);
      }
    }
    position: absolute;
    left: -3em;
    width: 22em;
    z-index: -1;
    .left, .right {
      animation: hem-sway-left 2s infinite;
      color: $color-dress;
      left: -0.7em;
      position: absolute;
      top: 14.5em;
      height: 4em;
      border-left: 0em solid transparent;
      border-right: 8em solid currentColor;
      border-bottom: 7em solid currentColor;
      border-top: 7em solid transparent;
      border-radius: 0 0 4em 0;
      transform: rotate(20deg);
      &.right {
        animation: hem-sway-right 2s infinite;
        transform: rotate(-20deg) scaleX(-1);
        right: -0.7em;
        left: auto;
      }
      &:after {
        content: "";
        color: $color-dress-hems;
        position: absolute;
        bottom: -7em;
        left: -0.3em;
        background: currentColor;
        width: 5em;
        height: 2em;
      }
    }
  }
  .waist {
    color: $color-dress-hems;
    .left, .right {
    position: absolute;
    width: 0em;
    left: -2em;
    background: transparent;
    top: 13em;
    height: 4em;
    border-left: 5.8em solid currentColor;
    border-bottom: 5.2em solid transparent;
    transform: rotate(25deg);
    border-radius: 0 0 0 0.5em;
      &:after {
        content: "";
        position: absolute;
        top: -2.6em;
        left: -1.7em;
        transform: rotate(245deg) scale(2.72, 1.5) translateX(-0.34em) translateY(-0.7em);
        border-bottom: 3em solid transparent;
        border-top: 3em solid currentColor;
        border-right: 2em solid currentColor;
        border-radius: 0 3em 0 0;
        z-index: 999;
      }
    }
    .right {
      right: -1.8em;
      left: auto;
      transform: scaleX(-1) rotate(25deg);
    }
  }
}

.shoulders {
  position: absolute;
  top: var(--dress-top);
  width: 18.5em;
  left: 10em;
  color:#e2e2e2;
  z-index: -4;
  .left, .right {
      position: absolute;
      width: 1em;
      height: 1.5em;
      left: -0.55em;
      top: -0.55em;
      border-top: 0.5em solid transparent;
      border-left: 0.5em solid transparent;
      border-right: 0.75em solid currentColor;
      transform: rotate(-20deg);
  }
  .right {
    right: -0.77em;
    left: auto;
    transform: rotate(17deg) scaleX(-1);
  }
}
.arms {
  position: absolute;
  top: var(--dress-top);
  width: 18.5em;
  left: 10em;
  height: 14em;
  color: white;
  z-index: 2;

  @keyframes arm-sway-left {
    from, to {
      transform: rotate(-20deg) scaleY(1.02);
    }
    49%, 51% {
      transform: rotate(-20deg)
    }
  }
  @keyframes arm-sway-right {
    from, to {
      transform: rotate(20deg) scale(-1, -1.02);
    }
    49%, 51% {
      transform: rotate(20deg) scale(-1, -1.00);
    }
  }
  .left, .right {
    transform-origin: left top;
    border-top: 11em solid transparent;
    border-left: 4em solid transparent;
    border-right: 4em solid currentColor;
    border-bottom: 11em solid transparent;
    border-radius: 0 0 1em 0;
    width: 0;
    height: 0;
    position: absolute;
    top: 2.5em;
    left: -6.7em;
    animation: arm-sway-left 3s infinite;
  }
  .right {
    transform-origin: right bottom;
    animation: arm-sway-right 3s infinite;
    left: calc(100% - 8.6em);
    top: -22.2em;
    border-radius: 0 1em 0 0;
  }
  + .arms {
    @keyframes arm-movement {
      from, to {
        transform: scaleY(1)
      }
      49%, 50% {
        transform: scaleY(1.05)
      }
    }
    margin-top: 0.5em;
    z-index: 0;
      color: rgba(0,0,0,0.2);
      filter: blur(4px);
  animation: arm-movement
    2s
    infinite;
  }
}

.jewel {
  --jewel-size: calc(4.8em/2);
  color: $color-jewel;
  background: currentColor;
  border-left: var(--jewel-size) solid lighten($color-jewel, 5%);
  border-right: var(--jewel-size) solid darken($color-jewel, 2%);
  border-top: var(--jewel-size) solid $color-jewel;
  border-bottom: var(--jewel-size) solid $color-jewel;
  border-radius: 2px;
  position: absolute;
  transform: rotate(45deg);
  
  .face & {
    top: 7.2em;
    left: -1.6em;
    z-index: -3;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    + .jewel {
      left: auto;
      right: -1.2em;
      transform: rotate(135deg);
    }
  }

  .bust & {
    z-index: 10;
    left: calc(50% - var(--jewel-size));
    top: calc(50% - var(--jewel-size));
  }
}

.jayphen {
  position: absolute;
  bottom: 2em;
  right: 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console