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


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


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.


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.


		%em There are no truly evil black cats, but there are irresponsible and stupid humans.
	%p Black cats are living creatures. They are not accessories to cool witch costumes. They are not objects to use for silly pranks.
		%strong Keep black cats safe on Halloween!
		- 6.times do


                $edge-len: 16%;
$txt: 'Trick or Treat' 'Fright Night' 
	'Happy Halloween';
$cn: 'bg_sq_halloween_';

body {
	display: flex;
	font: 1em comic sans ms, sans-serif;

section {
	box-sizing: border-box;
	padding: 1em;
	width: 32%;
	font-size: 1.25em;

p { margin: 1em 0; }

.scene {
	flex: 1;
	position: relative;
	perspective: 20em;

div, :before { position: absolute; }

.cube {
	top: 50%; left: 50%;
	margin: -.5*$edge-len;
	padding: .5*$edge-len;
	transform-style: preserve-3d;
	animation: a 16s linear infinite;
	&__face {
		top: 0; right: 0; bottom: 0; left: 0;
		opacity: .875;
		box-shadow: 0 0 1px #000;
		background: $c-orange;
		&:before {
			top: 50%; left: 50%;
			transform: translate(-50%, -50%);
			text-align: center;
		@for $i from 0 to 6 {
			$j: $i%2;
			$k: floor($i/2);
			&:nth-child(#{$i + 1}) {
					if($i < 4, rotateY($i*90deg), 
						rotateZ(pow(-1, $i)*90deg))
					translateX(50%) rotateY(90deg);
				@if $j == 0 {
					@if $i == 4 { background: $c-red; }
					&:before {
						content: nth($txt, $k + 1);
				@else {
					$url: $base + $cn + $k + '.jpg';
					background: url($url) 50% / cover;

@keyframes a {
	to { 
		transform: rotateY(-1turn) rotateX(2turn)