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.

              input(type='checkbox' id='i')
label(for='i') switch is on
		code off
		code on
	span.token--prop --i
	span.token--punc :
	code font-size
	|  is  
	code 2rem
	|  when switch is 
	em off
	code (--i: 0)
	|  and 
	code 10vw
	|  when switch is 
	em on
	code (--i: 1)
	h3 and stay alive...
	span.token--func calc
	span.token--punc (
		span.token--punc (
		span.token--num 1
		span.token--oper -
		span.token--func var
		span.token--punc (
		span.token--arg --i
		span.token--punc )
		span.token--punc )
		span.token--oper *
		span.token--len 2rem
		span.token--oper + 
		span.token--func var
		span.token--punc (
		span.token--arg --i
		span.token--punc )
		span.token--oper *
		span.token--len 10vw
	span.token--punc )
              $w: 5em;
$h: .4*$w;
$hue: 120;
$sat: 65%;
$lum: 27%;
$c0: rgba(#fff, .8);

*, :before, :after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-size: inherit;

html { overflow-x: hidden }

body {
	--i: 0;
	--i1: 0;
	font: 1.25em trebuchet ms, verdana, arial, sans-serif;
	@media (max-width: 775px) { font-size: 1em }
	@media (max-width: 605px) { --wide: 0 }
	@media (max-width: 400px) { font-size: 4vw }

input[type='checkbox'] {
	position: absolute;
	left: -100vw;

	&:checked ~ * { --i: 1 }

pre, code {
	font: 1em/ 2 consolas, monaco, monospace

label, .ini {
	grid-column: 1/ 3;
	font-size: calc((2 - var(--wide))*1em);

label {
	display: block;
	position: relative;
	margin: 1em auto;
	width: $w; height: $h;
	text-indent: -100vw;
	cursor: pointer

pre {
	padding: 0 .75em;
	background: hsl(0, 0%, 19%);
	color: #fff

section {
	min-height: 1.5em;
	height: 35vmin;
	/* test background */
				gainsboro 0, gainsboro 2px, 
				transparent 0, transparent 5px);/**/
	/* live background *
	background: linear-gradient($c0, $c0), 
			50%/ cover;/**/
	font: 900 calc((1 - var(--i))*2rem +  var(--i)*10vw) leckerli one, comic sans ms, cursive;

h3 {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 1.5em;
	height: 35vmin;
	color: #f90;
	text-shadow: 1px 1px 2px #000, 1px 1px 3px #000

code, em {
	--k: calc(1 - var(--i1) + (2*var(--i1) - 1)*var(--i));
	--c: hsl(calc(var(--i1)*#{$hue}), calc(var(--k)*#{$sat}), calc(var(--k)*#{$lum} + (1 - var(--k))*50%));
	&:nth-of-type(2n) { --i1: 1 }

p { padding: .5em }

em {
	color: var(--c);
	font-weight: 900;
	text-transform: uppercase

[aria-hidden] {
	position: absolute;
	top: 0;
	height: $h;
	display: flex;
	align-items: center;
	transform: translate(-2.5em);
	text-indent: 0;
	&:before, &:after {
		position: absolute;
		border-radius: 8px;
		z-index: -1;
		content: ''
	&:before {
		top: 0; right: 25%; bottom: 0; left: 25%;
		border: solid 2px currentcolor;
	&:after {
		top: 0; left: 25%;
		padding: 5px;
		width: .5*$w; height: $h;
		transform: translate(calc(var(--i)*100%));
		background: hsl(calc(var(--i)*#{$hue}), $sat, $lum) content-box;
	code {
		display: grid;
		grid: 1fr/ 1fr 1fr;
		flex: 1;
		min-width: $w;
		color: hsl(0, 0%, calc((1 + var(--k))*50%));
		text-align: center;
		&:before {
			order: var(--i1);
			color: var(--c);
			counter-increment: c var(--i1);
			content: '(' counter(c) ')'

.ini {
	margin: 0 auto;
	width: 6.5em

.token {
	&--prop { color: #d9abff }
	&--punc { color: #dedede; }
	&--func { color: #abe4ff }
	&--arg {
		color: #ddffab;
		&.l0:before {
			content: '\A     '
	&--oper { color: lemonchiffon }
	&--sass { color: #ffdaab }
	&--num {
		color: #ffabab;
		.ini &:after {
			counter-increment: i var(--i);
			content: counter(i)
🕑 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.