123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              .ctnr
	.title
	.cake
		.plate
		.crust
		.filling
		.toping
		.coulis
		.drips
		.lemon
		.rasberries
            
          
!
            
              @import 'compass/css3';
@import url("https://fonts.googleapis.com/css?family=Khula:400,700,800|Lilita+One|Rammetto+One|Seymour+One");

*{box-sizing: content-box; text-align: center;}

$bg: plum;
$Lil: 'Lilita One', cursive;
$Ram: 'Rammetto One', cursive;
$Khu: 'Khula', sans-serif;
$Sey: 'Seymour One', sans-serif;

$plate:     #F2DAF0;   $P: $plate;
$crust:     #E5AC72;   $C: $crust;
$lemon:     #FFFC4C;   $L: $lemon;
$raspberry: #B21127;   $R: $raspberry;
$toping:    $R + 70;   $T: $toping;

html,body{
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: $bg;
}

div{
	position: absolute;
	&:before, &:after {
		content: "";
		position: absolute;
	}
}
.ctnr{
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	margin: auto;
	overflow: hidden;
	text-align: center;
	height: 450px;
	width: 600px;
}

.title{
	left: 0;
	top: 0;
	height: 160px;
	width: 100%;
	&:before {
		top: 0;
		left: 0;
		width: inherit;
    color: $T;
		white-space: pre;
		content: "Day 14 : \A Cheese Cake";
		font-family: $Ram;
		font-size: 50px;
		line-height: 1.1em;
    @include text-shadow(
      0 1px $R
    )
	}
	&:after {
		bottom: 0;
		left: 0;
		width: inherit;
    color: $R;
		content: 
			"#Daily CSS Images";
		font-family: $Khu;
		font-size: 28px;
		font-weight: 500;
		line-height: 1.2em;
	}
}

.cake{
	left: 0;
	bottom: 0;
	right: 0;
	margin: auto;
	background: radial-gradient(ellipse at center, $bg - 50 60%, $bg 70%);
	height: 165px;
	width: 600px;
	@include border-radius(100%);
}


.plate{
	left: 0;
	bottom: 20px;
	right: 0;
	margin: auto;
	background: $P;
	height: 150px;
	width: 550px;
	@include border-radius(100%);
	@include box-shadow(
		inset 0 0   0 1px $P - 25,
					0 6px 0 0   $P - 50
	);
	&:after{
		top: 30px;
		left: 0;
		right: 0;
		margin: auto;
		background: $P;
		height: 80px;
		width: 395px;
		@include border-radius(100%);
		@include box-shadow(
			inset  0    0   0   1px $P - 15,
			inset -2px  0   0   0   $P - 50,
			inset -2px  3px 0   0   $P - 50,
			inset  0    3px 0   0   $P - 50
		);
	}
}
.crust{
	left: 0;
	bottom: 90px;
	right: 0;
	margin: auto;
	background: $C;
	height: 20px;
	width: 300px;
	@include border-radius(0 0 0 4px);
	@include box-shadow(
		inset 5px  0   $C - 30,
		inset 5px -3px $C - 30
	);
	&:after{
		top: 2px;
		left: 10px;
		background: $C - 20;
		height: 5px;
		width: 5px;
		@include border-radius(5px);
		@include box-shadow(
			 10px 6px $C - 30,
			 16px 2px $C - 15,
			 30px 1px $C - 25,
			 35px 4px $C - 30,
			 50px 7px $C - 20,
			 65px 2px $C - 35,
			 85px 4px $C - 40,
			 90px 6px $C - 50,
			 90px 2px $C - 20,
			110px 1px $C - 15,
			115px 2px $C - 35,
			130px 8px $C - 45,
			150px 4px $C - 30,
			160px 6px $C - 50,
			180px 4px $C - 20,
			200px 2px $C - 15,
			230px 6px $C - 30,
			235px 2px $C - 40,
			240px 8px $C - 20,
			260px 1px $C - 50,
			275px 5px $C - 30
		);
	}
}
.filling{
	left: 0;
	bottom: 110px;
	right: 0;
	margin: auto;
	background: $L + 120;
	height: 100px;
	width: 300px;
	@include box-shadow(
		inset  5px  0   $L + 40,
		inset  0  -40px $L + 80
	);
}
.toping{
	left: 0;
	bottom: 210px;
	right: 0;
	margin: auto;
	height: 50px;
	width: 300px;
	&:before{
		left: 30px;
		bottom: -9px;
		background: linear-gradient(5deg, $T 65%, $T + 30 65%);
		height: 50px;
		width: 270px;
		@include transform(rotate(4.5deg) skewx(-50deg));
		-webkit-clip-path: polygon(0 0, 268px 24px, 270px 26px, 0 50px);
						clip-path: polygon(0 0, 268px 24px, 270px 26px, 0 50px);
		@include border-radius(4px 0 0 0);
		@include box-shadow(inset  5px 0 $R + 50);
	}
	&:after{
		left: 0;
		bottom: 0;
		right: 0;
		margin: auto;
		background: linear-gradient(to right, $T - 20, $T + 30 50%);
		height: 6px;
		width: 300px;
		z-index: 2;
		@include border-radius(4px 0 0 0);
		@include box-shadow(
			inset -2px  0   $T + 30,
			inset  5px  0   $T - 40,
			inset  0   -4px $T - 20
		);	
	}
}
.coulis{
	left: 185px;
	bottom: 218px;
	height: 26px;
	width: 105px;
	background: $R - 40;
	@include transform(skewy(1deg));
	@include border-radius(100%);
	@include box-shadow(
		inset  2px -2px $R - 40,
		inset  5px -2px $R + 10,
				   0    2px $R - 60,
		inset -2px  1px $R - 40,
		inset -3px  3px $R + 30
	);
}
.drips{
	background: $T - 20;
	@include border-radius(10px);
	left: 160px;
	bottom: 202px;
	height: 13px;
	width: 10px;
	@include box-shadow(
		  0    4px $T - 40,
		 10px  0   $T - 20,
		 10px  4px $T - 20,
		 10px  8px $T - 20,
		 10px 12px $T - 20,
		 10px 16px $T - 40,
		 20px  0   $T - 20,
		 20px  4px $T - 20,
		 20px  8px $T - 40,
		 40px  0   $T - 20,
		 40px  4px $T - 40,
		120px  0   $T - 20,
		120px  4px $T - 40,
		180px  0   $T - 20,
		180px  4px $T - 40,
		190px  0   $T - 20,
		190px  4px $T - 20,
		190px  8px $T - 20,
		190px 12px $T - 40,
		220px  0   $T - 20,
		220px  4px $T - 40,
		258px  0   $T - 20,
		258px  4px $T - 40,
		268px  0   $T - 20,
		268px  4px $T - 20,
		268px  8px $T - 20,
		268px 12px $T - 20,
		268px 16px $T - 40,
		278px  0   $T - 20,
		278px  4px $T - 40,
		280px  0   $T + 30,
		280px  4px $T + 30
	);
}
.lemon{
	left: 200px;
	bottom: 230px;
	background: radial-gradient(circle at center bottom, $L + 50 58%, $L + 100 58%, $L + 100 65%, $L + 30 65%);
	height: 37px;
	width: 75px;
	@include transform(skew(-4deg, 4deg));
	@include border-radius(100px 100px 0 0);
	@include box-shadow(
		1px  0   $L,
		2px -1px $L,
		3px -2px $L,
		4px -3px $L,
		5px -4px $L
	);
	&:after{
		left: 0;
		bottom: 10px;
		right: 0;
		margin: auto;
		height: 40px;
		width: 40px;
		@include transform(scalex(0.75) rotate(45deg));
		@include box-shadow(
			4px 4px $L + 100
		);
	}
}
raspberry{
	background: $R;
	height: 8px;
	width: 8px;
	@include border-radius();
	@include box-shadow(
		// highlight first
		 0    -2px $R + 50,
		 1px  -1px $R + 50,
		// first line
		 6px   0   $R,
		 6px  -2px $R + 50,
		 7px  -1px $R + 50,
		12px   0   $R,
		12px  -2px $R + 50,
		13px  -1px $R + 50,
		-6px   0   $R,
		-6px  -2px $R + 50,
		-5px  -1px $R + 50,
	 -12px   0   $R,
	 -12px  -2px $R + 50,
	 -11px  -1px $R + 50,

		// second line
		 0    -8px $R,
		 0   -10px $R + 50,
		 1px  -9px $R + 50,
		 7px  -8px $R,
		 7px -10px $R + 50,
		 8px  -9px $R + 50,
		 0    -8px $R,
		 0   -10px $R + 50,
		 1px  -9px $R + 50,
		-7px  -8px $R,
		-7px -10px $R + 50,
		-6px  -9px $R + 50,
	 -12px  -8px $R,
	 -12px -10px $R + 50,
	 -11px  -9px $R + 50,

		// third line
		12px  -8px $R,
		12px -10px $R + 50,
		13px  -9px $R + 50,
		 3px -15px $R,
		 3px -17px $R + 50,
		 4px -16px $R + 50,
		 9px -15px $R,
		 9px -17px $R + 50,
		10px -16px $R + 50,
		-3px -15px $R,
		-3px -17px $R + 50,
		-2px -16px $R + 50,
		-9px -15px $R,
		-9px -17px $R + 50,
		-8px -16px $R + 50,

		// fourth line
		 4px -22px $R,
		 4px -24px $R + 50,
		 5px -23px $R + 50,
		-3px -21px $R,
		-3px -23px $R + 50,
		-2px -22px $R + 50
	);
}
.rasberries{
	left: 220px;
	bottom: 250px;
	height: 5px;
	width: 5px;
	@include border-radius();
	@include box-shadow(
		-42px 27px $R + 20,	
		-24px 34px $R + 45,
		 66px 34px $R + 40,	
		 76px 21px $R + 20,
		 80px 30px $R + 35,	
		 90px 16px $R + 40,
		 95px 30px $R + 50,
		100px 19px $R + 45,
		110px 24px $R + 25,	
		125px 32px $R + 40,	
		135px 26px $R + 30,
		145px 30px $R + 20,
		155px 28px $R + 50,
		170px 32px $R + 25,
		185px 33px $R + 40
	);
	&:before{
		left: 2px;
		bottom: -25px;
		@include transform(scale(0.8) rotate(2deg) skewx(-5deg));
		@extend raspberry;
	}
	
	&:after{
		left: 25px;
		bottom: -26px;
		@include transform(scale(0.7) rotate(-2deg) skewx(-5deg));
		@extend raspberry;
	}
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console