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

              
                <div id="cupcake"></div>
              
            
!

CSS

              
                @import "compass/css3";

*,
*:before,
*:after {
  @include box-sizing(border-box);
  
  margin: 0;
  padding: 0;
}

body {
  background: #323a45;
  padding: 70px 0;
  text-align: center;
}

#cupcake {
  @include border-bottom-left-radius(26px 40px);
  @include border-bottom-right-radius(26px 40px);

  content: " ";
  position: relative;
  display: inline-block;
  z-index: 0;

  margin-top: 106px;

  width: 66px;
  height: 0;

  border: solid;
  border-color: #ffffff transparent transparent;
  border-width: 28px 10px 0 10px;
  
  &:before,
  &:after {
    @include border-radius(50%);
    
    content: " ";
    position: absolute;
    display: block;
  }
  
  &:before {
    @include box-shadow((
      16px 0 0 0 #ffffff,  
      32px 0 0 0 #ffffff,
      
      0 32px 0 0px #ffffff,
      34px 32px 0 0px #ffffff,
      
      51px 16px 0 -6px #ffffff,
      49px 12px 0 -4px #ffffff,
      47px 10px 0 -7px #ffffff,
      45px 7px 0 -3px #ffffff,
      51px 14px 0 0 #323a45,
      
      24px 7px 0 -4px #ffffff,
      21px 10px 0 -4px #ffffff,
      19px 8px 0 -4px #ffffff,
      17px 14px 0 -4px #ffffff,
      15px 12px 0 -4px #ffffff,
      13px 10px 0 -4px #ffffff,
      11px 8px 0 -4px #ffffff,
      17px 14px 0 0 #323a45,
      
      -17px 16px 0 -6px #ffffff,
      -16px 12px 0 -4px #ffffff,
      -13px 10px 0 -7px #ffffff,
      -11px 7px 0 -3px #ffffff,
      -17px 14px 0 0 #323a45,
       
      34px 24px 0 -4px #ffffff,
      44px 24px 0 -8px #ffffff,
      24px 24px 0 -8px #ffffff,
      34px 24px 0 0 #323a45,
       
      0 24px 0 -4px #ffffff,
      10px 24px 0 -8px #ffffff,
      -10px 24px 0 -8px #ffffff,
      0 24px 0 0 #323a45,
       
      16px 19px 0 22px #ffffff
    ));
    
    background: #ffffff;
    z-index: -1;
    
    top: -67px;
    left: -5px;
    
    width: 24px;
    height: 24px;
  }
  
  &:after {
    background: #e14f43;
    border: solid 4px #323a45;
    z-index: 10;
    
    top: -88px;
    left: 8px;
    
    width: 30px;
    height: 30px;
  }
}
              
            
!

JS

              
                /* 
A tasty cupcake!
Made by Kevin Jannis (@kevinjannis)
View more at www.janniskev.in 

Inspired by: https://dribbble.com/shots/1646417-Cupcake
*/


              
            
!
999px

Console