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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <div class="container">
  <div class="guy__box">
  </div>
</div>
              
            
!

CSS

              
                $background: orange;
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: $background;
}

.container {
  position: relative;
  height: 325px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.guy {
  position: relative;
  fill: rgba(0, 0, 0, 0);
  opacity: 0;
  
    &__box {
      height: 199px;
      width: 74px;
      position: relative;
      background: rgba(50, 50, 50, .5);
      // -webkit-mask-image:
        // mask: no-repeat 50% 50%;
      -webkit-mask: url('data:image/svg+xml;utf8,<svg class="guy" viewBox="0 0 74 199" version="1.1"
        xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
        x="0px" y="0px" width="74px" height="199px"
    >
        <g>
            <path fill="orange" d="M 36.0343 0 C 44.9963 0 52.2616 7.2693 52.2616 16.2366 C 52.2616 25.2036 44.9963 32.4729 36.0343 32.4729 C 27.0723 32.4729 19.8071 25.2036 19.8071 16.2366 C 19.8071 7.2693 27.0723 0 36.0343 0 Z" />
            <path class="guy" fill="#E0EBD3" d="M 16.8497 189.8979 C 16.8497 194.9209 20.9269 199 25.9468 199 C 30.9767 199 35.0479 194.9209 35.0479 189.8979 L 35.0558 113.5334 L 39.1072 113.5334 L 39.0813 189.8979 C 39.0813 194.9209 43.1545 199 48.1783 199 C 53.2023 199 57.2734 194.9209 57.2734 189.8979 L 57.3132 58.2434 L 61.303 58.2434 L 61.303 106.7595 C 61.303 116.5205 74.0276 116.5205 73.9999 106.7595 L 73.9999 57.2087 C 73.9999 46.4268 67.6674 35.8599 55.0598 35.8599 L 18.6874 35.8438 C 7.1978 35.8438 0 45.2168 0 56.9121 L 0 106.7615 C 0 116.4507 12.7944 116.4507 12.7944 106.7615 L 12.7944 58.2454 L 16.8676 58.2454 L 16.8497 189.8979 Z" />
        </g>
    </svg>') no-repeat 50% 50%;
      &:after {
        position: absolute;
        content: " ";
        bottom: 0;
        // height: 150px;
        width: 100%;
        background: yellow;
        // z-index: 50;
        animation: fill .9s ease forwards;
    }
  }
}

@keyframes fill {
  0% { height: 0; }
  100% { height: 50%; }
}
              
            
!

JS

              
                
              
            
!
999px

Console