cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              body
  .container
    .filling
    .top
    .topside
    .topcrust
    .crust
    .cream
    .cherry
            
          
!
            
              $red: #CB4335;
$darkgray: #1C2833;
$tan: #E8D0AB;
$darktan: darken($tan, 10%);
$offwhite: #FEF5E7;
$white: #FFFFFF;
$fillingred: rgba(138,51,42, 1);

@mixin rotate($deg) {
   -ms-transform: rotate($deg);
   -webkit-transform: rotate($deg);
   -moz-transform: rotate($deg);
    transform: rotate($deg);
}

body {
  background: $darkgray;
}

.container {
  position: relative;
  height: 400px;
  width: 600px;
  margin: 50px auto;
}

.top {
  position: absolute;
  top: 20%;
  left: 20%;
  height: 50%;
  width: 70%;
  background: $tan;
  -webkit-clip-path: polygon(34% 14%, 0 57%, 100% 63%);
clip-path: polygon(34% 14%, 0 57%, 100% 63%);
  z-index: 6;
}

.topcrust {
  position: absolute;
  top: 49%;
  left: 20%;
  width: 4%;
  height: 30%;
  border-radius: 20% 20% 0 20%;
  background: $darktan;
  z-index: 7;
  &:before, &:after {
    position: absolute;
    content: '';
    top: 2%;
    height: 15%;
    width: 1770%;
    border-radius: 20px;
    background: $darktan;
    @include rotate(1.5deg);
  }
  &:before {
    left: -12%;
  }
  &:after {
    top: 95%;
    left: 15%;
  }
}

.topside {
  position: absolute;
  top: 37%;
  left: 18.5%;
  height: 15%;
  width: 2%;
  border-radius: 20%;
  background: $darktan;
  @include rotate(-20deg);
  z-index: 7;
}

.crust {
  position: absolute;
  top: 20%;
  left: 17%;
  height: 30%;
  width: 27.5%;
  border-radius: 20px 20px 10px 10px;
  background: $darktan;
  @include rotate(-28deg);
  z-index: 3;
  &:before {
    position: absolute;
    content: '';
    left: -5%;
    top: 5%;
    height: 120%;
    width: 15%;
    border-radius: 20px;
    background: $darktan;
    @include rotate(10deg);
  }
}

.filling {
  position: absolute;
  top: 53%;
  left: 22%;
  height: 27%;
  width: 69%;
  border-radius: 20px 20px 10px 10px;
  background: $red;
  z-index: 4;
  &:before {
    position: absolute;
    height: 25%;
    width: 10%;
    content: '';
    border-radius: 50%;
    background: $fillingred;
    box-shadow: 20px 30px $fillingred, 75px 25px $fillingred,10px 70px $fillingred, 80px 75px $fillingred, 95px -10px $fillingred,130px 45px $fillingred, 160px 90px $fillingred, 240px 80px $fillingred, 300px 55px $fillingred,350px 10px $fillingred,260px 30px rgba(138,51,42, 1), 190px 60px $fillingred,200px 20px $fillingred,370px 50px rgba(138,51,42, 1), 340px 80px $fillingred; 
  }
}

.cream {
  position: absolute;
  top: 25%;
  left: 45%;
  height: 20%;
  width: 20%;
  border-radius: 60px 60px 10px 10px;
  background: lighten($offwhite, 3%);
  z-index: 8;
  &:before {
    position: absolute;
    content: '';
    top: -20%;
    left: 30%;
    width: 40%;
    height: 50%;
    border-radius: 50%;
    background: $red;
  }
}
            
          
!
999px
Loading ..................

Console