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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                .weasley-clock
	.blue-head
	.frame
		.frame__left
		.frame__right
		.head
			p The
			p Weasleys
		.clock
			.clock__arms
				.clock__arm.arthur 
					span Arthur
					.mid
					.spoon
						img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/567707/weasleyarthur.jpg")
				.clock__arm.molly 
					span Molly
					.mid
					.spoon
						img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/567707/weasleymolly.jpg")
				.clock__arm.bill 
					span Bill
					.mid
					.spoon
						img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/567707/weasleybill.jpg")
				.clock__arm.charles 
					span Charles
					.mid
					.spoon
						img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/567707/weasleycharles.jpg")
				.clock__arm.percy 
					span Percy
					.mid
					.spoon
						img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/567707/weasleypercy.jpg")
				.clock__arm.fred 
					span Fred
					.mid
					.spoon
						img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/567707/weasleygeorge.png")
				.clock__arm.george 
					span George
					.mid 
					.spoon
						img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/567707/weasleyfred.jpg")
				.clock__arm.ron 
					span Ron
					.mid
					.spoon
						img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/567707/weasleyron.jpg")
				.clock__arm.ginny 
					span Ginny
					.mid
					.spoon
						img(src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/567707/weasleyginny.jpg")
						
						
						
						
						
			.clock__body
				.clock__words
					.clock__words__char.transit(data-splitting) Transit
					.clock__words__char.lost(data-splitting) Lost
					.clock__words__char.home(data-splitting) Home
					.clock__words__char.danger(data-splitting) Danger
					.clock__words__char.garden(data-splitting) Garden
					.clock__words__char.school(data-splitting) School
					.clock__words__char.work(data-splitting) Work
					.clock__words__char.quidditch(data-splitting) Quidditch
				.clock__inner
					.clock__deco
						.dot
	.columns
		.columns__tophead
		.columns__bottomhead
		- for (var i = 0; i < 8; ++i) 
			.columns__ind
				.columns__ind__ridge
              
            
!

CSS

              
                $peach: #f3d97e;
$peach-dark: #d8bd5b;
$peach-darker: #e4bd30;
$blue: #74b9c5;
$blue-light: #80BFCA;
$blue-dark: #6AA9B4;
$blue-darker: #5F98A2;
$orange: #f19838;
$orange-dark: #DC8B33;
$orange-darker: #C67D2E;
$brown: #A44200;
$brown-dark: #972D07;
$brown-darker: #3C1518;
$gold: #926f34;
$silver: #777;

* {
	box-sizing: border-box;
}

$border: 4px solid;

body {
  background: rgb(63, 76, 107);
  font-family: 'Comfortaa', sans-serif;
}

.weasley-clock {
	margin: 1em auto 0;
	max-width: 900px;
	min-height: 100vh;
	font-family: "Mystery Quest";
	font-size: 2.5rem;
	text-transform: uppercase;
	position: relative;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.blue-head {
	position: absolute;
	top: -5em;
	width: 850px;
	height: 500px;
	margin: auto;
	background: $blue;
	border: $border;
	left: 0;
	right: 0;
	border-radius: 50% 50% 8px 8px;
	&:before, &:after {
		content: '';
		position: absolute;
		top: 32px;
		left: -5px;
		width: 200px; 
		height: 200px; 
		border: $border;
		border-width:  0 5px 5px 0;
		background: rgb(63, 76, 107);
		border-radius: 0 0 150% 0;
		box-shadow: 12px 0 0 -1px rgba(0, 0, 0, 0.1);
	}
	&:after {
		left: auto;
		right: -5px;
		border-width:  0 0 5px 5px;
		border-radius: 0 0 0 150%;
		box-shadow: -12px 0 0 -1px rgba(0, 0, 0, 0.1);
	}
}

.frame {
	width: 700px;
	padding: 40px 40px 60px;
	background: $orange;
	margin: auto;
	border-radius: 400px 400px 0 0;
	border: $border;
	position: relative;
	box-shadow: inset 0 6px 0 6px rgba(0, 0, 0, 0.1);
	&__left, &__right {
		position: absolute;
		width: 10%;
		height: 68%;
		background: $blue;
		left: -10%;
		bottom: -4px;
		border: $border;
		background: linear-gradient(to right,$orange-dark 50%, $orange-darker 50%);
		background-size: 10px;
		z-index: -1;
		box-shadow: inset 0 15px 0 -7px rgba(0,0,0,0.4), inset 0 -188px 0 -188px rgba(0,0,0,0.4);
		&:before {
			content: '';
			position: absolute;
			bottom: -4px;
			width: calc(100% + 5px);
			left: -10px;
			border: $border;
			height: 150px;
			background: $orange-darker;
			border-radius: 8px 8px 0 0;
			box-shadow: 5px -5px 0 0px rgba(0, 0, 0, 0.4);
		}
	}
	&__right {
		left: auto;
		right: -10%;
		background: linear-gradient(to right,$blue-dark 50%, $blue-darker 50%);
		background-size: 10px;
		&:before {
			background: $blue-darker;
			left: -4px;
			box-shadow: -5px -5px 0 0px rgba(0, 0, 0, 0.4);
		}
	}
}

.head {
	width: 500px;
	height: 240px;
	background: radial-gradient(ellipse at bottom, $peach, $peach 55%, $peach-dark);
	margin: 0 auto -4px;
	border-radius: 400px 400px 0 0;
	padding: 50px 15px 0;
	border: $border;
	border-bottom: 0;
	position: relative;
	z-index: 10;
	overflow: hidden;
	box-shadow: inset 0 6px 0 6px rgba(0, 0, 0, 0.1);
	text-align: center;
	font-size: 5.2rem;
	img {
		width: 100%;
		height: 100%;
		margin:0 auto 0;
		object-fit: contain;
	}
}

.clock {
	width: 550px;
	height: 550px;
	background: radial-gradient(ellipse  at top, $peach, $peach 60%, $peach-darker);
	margin: 0 auto;
	padding: 0px;
	border: $border;
	border-radius: 8px;
	position: relative;
	box-shadow: inset 12px 0 0 -7px $peach-dark, inset -12px 0 0 -7px $peach-dark, inset 0 -12px 0 -7px $peach-dark;
	
	&__body {
		width: 100%;
		height: 100%;
		border-radius: 100%;
		display: grid;
		place-items: center;
	}
	&__words {
		position: absolute;
		width: 100%;
		height: 100%;
		display: grid;
		grid: repeat(2, 225px) /  repeat(4, 25%);
		overflow: hidden;
		transform: scale(1.14) translate(22px, 10px);
		&__char {
			white-space: nowrap;
			font-size: 2.2rem;
			span {
				display: inline-block;
				vertical-align: top;
				margin-right: 3px;
				&:nth-child(even) {
					margin-top: 5px;
				}
			}
			&.transit {
				transform: rotate(-70deg) translate(-45px,100px);
				span:nth-child(1) {
					transform: rotate(-10deg);
				}
				span:nth-child(2) {
					transform: rotate(-5deg);
				}
				span:nth-child(3) {
					transform: rotate(15deg);
				}
				span:nth-child(4) {
					transform: rotate(30deg);
				}
				span:nth-child(5) {
					transform: translate(-50%, 60%) rotate(30deg);
				}
				span:nth-child(6) {
					transform: translate(-80%, 60%) rotate(30deg);
				}
				span:nth-child(7) {
					transform: translate(-40%, 80%) rotate(35deg);
				}
			}
			&.lost {
				transform: rotate(-29deg) translate(10px,30px);
				span:nth-child(4) {
					transform: rotate(18deg) translateY(-2px);
				}
			}
			&.home {
				transform: rotate(15deg) translate(-60px,50px);
				span:nth-child(1) {
					transform: rotate(-10deg);
				}
				span:nth-child(2) {
					margin-top: -8px;
				}
				span:nth-child(3) {
					transform: rotate(8deg);
				}
				span:nth-child(4) {
					transform: rotate(22deg) translate(0, -5px);
				}
			}
			&.danger {
				transform: rotate(42deg) translate(-50px, 145px);
				span:nth-child(4) {
					transform: rotate(15deg) translateY(2px);
				}
				span:nth-child(5) {
					transform: rotate(25deg) translate(3px,12px);
				}
				span:nth-child(6) {
					transform: rotate(30deg) translate(3px,12px);
				}
			}
			&.garden{
				transform: rotate(-105deg) translate(15px,98px);
				span:nth-child(1) {
					transform: rotate(-10deg);
				}
				span:nth-child(2) {
					margin-top: -4px;
				}
				span:nth-child(4) {
					margin-top: -8px;
				}
				span:nth-child(5) {
					transform: rotate(20deg);
				}
				span:nth-child(6) {
					transform: rotate(25deg);
				}
			}
			&.school {
				transform: rotate(-155deg) translate(-12px,-2px);
				span:nth-child(1) {
					transform: rotate(-10deg);
				}
				span:nth-child(2) {
					margin-top: -4px;
				}
				span:nth-child(4) {
					margin-top: -2px;
				}
				span:nth-child(5) {
					transform: rotate(10deg);
				}
				span:nth-child(6) {
					transform: rotate(25deg) translateY(10px);
				}
			}
			&.work {
				transform: rotate(-210deg) translate(75px,20px);
				span:nth-child(4){
					transform: rotate(5deg) translateY(5px);
				}
			}
			&.quidditch {
				transform: rotate(98deg) translate(-55px,130px);
				span:nth-child(5) {
					transform: rotate(8deg) translateY(5px);
				}
				span:nth-child(6) {
					transform: rotate(8deg) translateY(5px);
				}
				span:nth-child(7) {
					transform: rotate(15deg) translate(3px,15px);
				}
				span:nth-child(8) {
					transform: rotate(15deg) translate(3px,15px);
				}
				span:nth-child(9) {
					transform: rotate(28deg) translate(10px,35px);
				}
			}
		}
	}
	&__inner {
		width: 70%;
		height: 70%;
		border-radius: 50%;
		//border: 2px solid rgba($brown-darker, 1);
		display: grid;
		place-items: center;
		//background-image: linear-gradient(90deg, transparent 40%, $brown-darker 40%, $brown-darker 60%,transparent 60%, transparent 100%), linear-gradient(180deg, transparent 40%, $brown-darker 40%, $brown-darker 60%,transparent 60%, transparent 100%), linear-gradient(45deg, transparent 43%, $brown-darker 43%, $brown-darker 57%,transparent 57%, transparent 100%),linear-gradient(-45deg, transparent 43%, $brown-darker 43%, $brown-darker 57%,transparent 57%, transparent 100%);
	}
	.clock__deco {
		width: 96%;
		height: 96%;
		border-radius: 50%;
		display: grid;
		place-items: center;
		.dot {
			width: 14px;
			height: 14px;
			border-radius: 50%;
			position: relative;
			z-index: 20;
			background: radial-gradient(#7d7d7d, rgba(43, 43, 42, 0.5));
			box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
			transform: translate(-2px, -19px);
		}
	}
	&__arms {
		width: 100%;
		height: 100%;
		position: absolute;
		top: -18px;
		left: 0;
	}
	&__clip {
		font-family: Lakki Reddy;
		font-size: 1.5rem;
		width: 38%;
		clip-path: polygon(0 0, 0 100%, 100% 50%);
		height: 30px;
		box-shadow: 0 0 15px #333;
	}
	&__arm {
		color: $gold;
		font-family: Lakki Reddy;
		font-size: 1.6rem;
		width: 32%;
		border: 3px solid;
		text-align: left;
		padding: 3px 0 0 1.5rem;
		border-radius: 40% 100% 100% 40%;
		position: absolute;
		letter-spacing: 2px;
		left: calc(50% - 3px); 
		top: calc(50% - 11px);
		transform-origin: left center;
		height: 22px;
		box-shadow: 0 2px 0 rgba(0,0,0,0.15), inset 0px 2px 0 0px rgba(0,0,0,0.15);
		text-shadow: 2px 0 0 rgba(0,0,0,0.2);
		&:before {
			content: '';
			position: absolute;
			height: 0;
			width: 0;
			border-top: 8px solid transparent;
  		border-bottom: 8px solid transparent; 
  		border-right: 110px solid rgba(0,0,0,0.2);
			right: 100%;
			top: 0px;
			transform: translate(-2px, 2px);
		}
		&:after {
			content: '';
			position: absolute;
			height: 0;
			width: 0;
			border-top: 8px solid transparent;
  		border-bottom: 8px solid transparent; 
  		border-right: 130px solid $gold;
			right: 100%;
			top: 0px;
		}
		.mid {
			content: '';
			position: absolute;
			width: 18px;
			height: 18px;
			background: $gold;
			top: -1px;
			left: -8px;
			transform: rotate(45deg);
			border-radius: 4px;
			box-shadow: 0 2px 0 rgba(0,0,0,0.15);
		}
		.spoon {
			width: 60px;
			height: 80px;
			border-radius: 100%;
			overflow: hidden;
			position: absolute;
			transform: rotate(-90deg);
			border: 4px solid;
			right: 155%;
			top: -30px;
			z-index: 1;
			box-shadow: 0 2px 0 rgba(0,0,0,0.15);
			img {
				width: 100%;
				height: 100%;
				object-fit: cover;
				object-position: top;
				filter: grayscale(0.7);
			}				
		}
		&:nth-child(odd) {
			color: $silver;
			&:after {
				border-right-color: $silver;
			}
			.mid {
				background: $silver;
			}
		}
		&.arthur {
			transform: rotate(55deg);
			width: 38%;
			padding-left: 4rem;
			animation: arthur 40s infinite 13s;
			.spoon {
				right: 165%;
			}
		}
		&.molly {
			transform: rotate(155deg);
			padding-left: 4rem;
			width: 36%;
			animation: molly 40s infinite 25s;
			.spoon {
				right: 165%;
			}
		}
		&.bill {
			transform: rotate(75deg);
			padding-left: 8rem;
			width: 25%;
			.spoon {
				right: 185%;
				
			}
		}
		&.charles {
			transform: rotate(210deg);
		}
		&.fred {
			transform: rotate(125deg);
			padding-left: 5.5rem;
			width: 36%;
			animation: fred 45s infinite 10s;
		}
		&.george {
			transform: rotate(115deg);
			padding-left: 3.5rem;
			width: 38%;
			animation: george 45s infinite 10.2s;
		}
		&.percy {
			transform: rotate(95deg);
			padding-left: 6.5rem;
			width: 20%;
			//animation: percy 40s infinite 20s;
			&:after {
				border-right-width: 100px;
			}
		}
		&.ron {
			transform: rotate(0deg);
			padding-left: 8rem;
			width: 25%;
			animation: ron 35s infinite 7s;
		}
		&.ginny {
			transform: rotate(10deg);
			padding-left: 7rem;
			width: 22%;
		}
	}
}

@keyframes percy {
	0% { transform: rotate(95deg); }
	9% { transform: rotate(220deg); }
	10% { transform: rotate(220deg); }
	20% { transform: rotate(275deg); }
	30% { transform: rotate(275deg); }
	70% { transform: rotate(95deg); }
}

@keyframes molly {
	0% { transform: rotate(155deg); }
	5% { transform: rotate(275deg); }
	10% { transform: rotate(275deg); }
	20% { transform: rotate(200deg); }
	30% { transform: rotate(200deg); }
	35% { transform: rotate(275deg); }
	75% { transform: rotate(275deg); }
	80% { transform: rotate(155deg); }
}

@keyframes arthur {
	0% { transform: rotate(60deg); }
	9% { transform: rotate(220deg); }
	10% { transform: rotate(220deg); }
	20% { transform: rotate(275deg); }
	30% { transform: rotate(275deg); }
	40% { transform: rotate(275deg); }
	42% { transform: rotate(240deg); }
	50% { transform: rotate(240deg); }
	70% { transform: rotate(60deg); }
}

@keyframes fred {
	0% { transform: rotate(125deg); }
	25% { transform: rotate(125deg); }
	30% { transform: rotate(15deg); }
	50% { transform: rotate(15deg); }
	60% { transform: rotate(-35deg); }
	65% { transform: rotate(-35deg); }
	70% { transform: rotate(125deg); }
}

@keyframes george {
	0% { transform: rotate(115deg); }
	25% { transform: rotate(115deg); }
	30% { transform: rotate(5deg); }
	50% { transform: rotate(5deg); }
	60% { transform: rotate(-45deg); }
	65% { transform: rotate(-45deg); }
	70% { transform: rotate(115deg); }
}

@keyframes ron {
	0% { transform: rotate(0); }
	9% { transform: rotate(240deg); }
	10% { transform: rotate(240deg); }
	20% { transform: rotate(105deg); }
	30% { transform: rotate(105deg); }
	40% { transform: rotate(-45deg); }
	42% { transform: rotate(-45deg); }
	50% { transform: rotate(105deg); }
	70% { transform: rotate(105deg); }
	75% { transform: rotate(0); }
}

.columns {
	display: grid;
	grid-template-columns:  2% 3% repeat(8, 1fr) 3% 2% ;
	width: 860px;
	margin: -4px auto;
	grid-column-gap: 15px;
	position: relative;
	&__tophead {
		grid-column: 1 / -1;
		height: 40px;
		background: $blue;
		border-radius: 10px;
		border: $border;
		width: 100%;
		height: 40px;
		box-shadow: 0px -16px 0 -10px rgba(0,0,0,0.2);
	}
	&__bottomhead {
		grid-column: 2 / -2;
		border-radius: 10px;
		border: $border;
		background: $peach-darker;
		width: 100%;
		height: 30px;
		margin: -4px auto 0;
		box-shadow: inset 0 12px 0 -7px rgba(0,0,0,0.2);
	}
	&__ind {
		height: 130px;
		width: 90%;
		background: $orange-dark;
		border: $border;
		border-width: 0 4px;
		position: relative;
		box-shadow: inset 0 40px 0 -7px rgba(0,0,0,0.2);
		&:before {
			content: '';
			width: 130%;
			background: $orange-dark;
			height: 25px;
			border: $border;
			position: absolute;
			top: -4px;
			left: -14px;
			border-radius: 6px;
			box-shadow: inset 0 12px 0 -7px rgba(0,0,0,0.2);
		}
		&:nth-of-type(3), &:nth-of-type(9) {
			background: $blue-dark;
			&:before {
				background: $blue-dark;
			}
		}
		&__ridge, &__ridge:before {
			position: absolute;
			height: 70%;
			border-radius: 20px 20px 0 0;
			width: 15px;
			bottom: 0;
			background: rgba(0,0,0,0.2);
		}
		&__ridge {
			left: 18%;
			&:before {
				content: '';
				height: 100%;
				left: 160%;
				right: 4px;
			}
		}
		&:nth-child(3) {
			grid-column-start: 3;
		}
	}
}
              
            
!

JS

              
                Splitting({
  target: "[data-splitting]",
  by: "chars",
  key: null
});
              
            
!
999px

Console