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 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

              
                main
	input(type="checkbox" id="ditto-me")
	label(for="ditto-me")
		span
	.gengar
		.ear.left
		.ear.right
		.hair
		.hair.two
		.hand
		.hand.two
		.mouth
		.eye.one
		.eye.two
		.leg
              
            
!

CSS

              
                body {
	background: #fff;
	font-family: "Comfortaa", sans-serif;
}

* {
	box-sizing: border-box;
	&:before,
	&:after {
		content: "";
		position: absolute;
	}
}

$purple: #9179c6;
$purpler: #7a63ad;
$asakusa: #f6b392;
$ditto: #f38dcb;

main {
	width: 400px;
	height: 400px;
	margin: auto;
	text-align: center;
}

.gengar {
	background: $purple;
	margin: 3em auto 5em;
	width: 310px;
	height: 350px;
	border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
	margin: auto;
	position: relative;
	.ear {
		width: 150px;
		height: 150px;
		background: $purple;
		border-radius: 10px;
		position: relative;
		transform: rotate(-120deg) skewX(-40deg) scale(1, 0.866);
		position: absolute;
		top: 0;
		&.right {
			position: absolute;
			background: $purple;
			transform: rotate(110deg) skewX(40deg) scale(1, 0.866);
			right: 0;
		}
	}
	.hair {
		width: 0;
		height: 0;
		position: absolute;
		top: -45px;
		left: 50%;
		margin-left: -45px;
		transform: rotate(10deg);
		border-bottom: 100px solid $purple;
		border-left: 70px solid transparent;
		border-right: 70px solid transparent;
		&.two,
		&.two:before,
		&.two:after {
			transform: rotate(-30deg);
			margin-left: -60px;
			top: -35px;
			border-bottom: 80px solid $purple;
			border-left: 30px solid transparent;
			border-right: 30px solid transparent;
		}
		&.two:before {
			transform: rotate(60deg) translate(130px, -50px);
		}
		&.two:after {
			transform: rotate(-15deg) translate(-10px, 48px);
			border-bottom: 40px solid $purple;
		}
	}
	.eye {
		width: 100px;
		height: 50px;
		background: $asakusa;
		border-radius: 0 0 200px 200px;
		position: absolute;
		top: 33%;
		overflow: hidden;
		transition: 0.3s ease;
		&:before {
			width: 20px;
			height: 35px;
			background: black;
			border-radius: 100%;
			transform: rotate(-35deg);
		}
		&:after {
			width: 8px;
			height: 8px;
			border-radius: 50%;
			background: white;
			left: 43%;
			top: 10px;
		}
		&.one {
			left: 50%;
			transform: rotate(35deg);
			margin-left: -120px;
		}
		&.two {
			transform: rotate(-35deg) scaleX(-1);
			right: 50%;
			margin-right: -120px;
		}
	}
	.mouth {
		position: absolute;
		left: 50%;
		margin-left: -125px;
		top: 7%;
		width: 250px;
		height: 190px;
		border-radius: 50%;
		box-shadow: 0 75px 0 -10px white;
		transition: 0.3s ease;
	}
	.leg {
		position: absolute;
		width: 320px;
		height: 130px;
		border-top-left-radius: 200px;
		border-top-right-radius: 200px;
		border: 80px solid $purpler;
		border-bottom: 0;
		top: 75%;
		left: 0;
		right: 0;
		margin: auto;
		z-index: -1;
		&:before,
		&:after {
			height: 20px;
			border-radius: 10px;
			width: 85px;
			bottom: -5px;
			background: $purpler;
		}
		&:before {
			left: -84.5px;
		}
		&:after {
			right: -84.5px;
		}
	}
	.hand {
		position: absolute;
		width: 85px;
		height: 140px;
		background: $purple;
		border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
		transform: rotate(59deg);
		top: 31%;
		left: -40px;
		&.two {
			transform: rotate(-59deg);
			left: auto;
			right: -40px;
		}
	}
}

input[type="checkbox"] {
	height: 0;
	width: 0;
	visibility: hidden;
}

label {
	background: #eee;
	width: 160px;
	height: 75px;
	border-radius: 80px;
	display: inline-block;
	margin: 4em auto;
	position: relative;
	cursor: pointer;
	span {
		position: absolute;
		top: 5px;
		left: 5px;
		width: 65px;
		height: 65px;
		background: #333;
		border-radius: 50%;
		transition: 0.5s;
		border: 3px solid #222;
		background: radial-gradient(
				#fff,
				#fff 15%,
				#333 15%,
				#333 24%,
				transparent 24%
			),
			linear-gradient(
				to bottom,
				#d02222,
				#d02222 45%,
				#222 45%,
				#222 52%,
				#fff 52%
			);
	}
}

input:checked {
	+ label span {
		left: 90px;
		transform: rotate(360deg);
		background: $ditto;
		border-radius: 200% 320% 150% 150%;
		border-radius: 50%;
		background-repeat: no-repeat;
		background-image: radial-gradient(ellipse, black 50%, transparent 50%),
			radial-gradient(ellipse, black 50%, transparent 50%),
			linear-gradient(#333, #333);
		background-size: 6px 6px, 6px 6px, 25px 2px;
		background-position: 28% 50%, 80% 50%, 55% 64%;
	}
	~ .gengar {
		.eye {
			background: black;
			width: 16px;
			height: 16px;
			border-radius: 50%;
			&.one {
				margin-left: -60px;
			}
			&.two {
				margin-right: -60px;
			}
			&:before,
			&:after {
				content: none;
			}
		}
		.mouth {
			margin-left: -100px;
			top: 35%;
			width: 210px;
			height: 50px;
			border-radius: 50%;
			box-shadow: 0 15px 0 -10px #131313;
		}
	}
}

              
            
!

JS

              
                //Reference: https://obihoernchen.net/pokemon/pokemon/94
              
            
!
999px

Console