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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

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


                <div class="pl">
	<div class="pl__sphere"></div>
	<span class="pl__sphere-shadow"></span>
	<div class="pl__sphere"></div>
	<span class="pl__sphere-shadow"></span>
	<div class="pl__sphere"></div>
	<span class="pl__sphere-shadow"></span>
	<div class="pl__sphere"></div>
	<span class="pl__sphere-shadow"></span>


                // Mixins
@mixin moveFilter($brightness,$blur)
	filter: brightness($brightness) blur($blur)
	-webkit-filter: brightness($brightness) blur($blur)
@mixin sphere($color)
	background: lighten($color,15%)
	box-shadow: 0 -0.75em 0.5em $color inset, 0 0 0.5em fade-out(lighten($color,10%),0.3)
// Normal styles
$sphereDiam: 2em
$spaceBetween: 1em
$sphereCount: 4
$xGridOffset: 0.5em
$animDur: 2s
	border: 0
	box-sizing: border-box
	margin: 0
	padding: 0
	font-size: calc(16px + (32 - 16) * (100vw - 320px) / (1280 - 320))
	font: 1em/1.5 sans-serif
	height: 100vh
	background: linear-gradient(rgb(4,23,73) calc(50% + 1.5em),rgb(6,39,121) calc(50% + 2.5em) calc(50% + 10.5em), rgb(4,23,73))
	position: relative
	overflow: hidden
	perspective: 800px
	transform-style: preserve-3d
	&, &:before
		width: 100%
		height: 100%
	&:before, &__sphere, &__sphere-shadow
		position: absolute
	&:before, &__sphere-shadow
		display: block
		background: linear-gradient(rgb(6,39,121),rgba(6,39,121,0)), radial-gradient(100% 100% at 50% 50%,rgba(6,39,121,0) 37.5%,rgb(6,39,121) 50%), repeating-linear-gradient(0deg,rgba(8,55,170,0) 0 0.95em,rgb(8,55,170) 0.95em 1em), repeating-linear-gradient(90deg,rgba(8,55,170,0) 0 0.9em,rgb(8,55,170) 0.9em 1em) $xGridOffset 0
		content: ""
		top: 50%
		left: 50%
		transform: translate(-50%,-50%) rotateX(90deg) translateZ(-4em)
		width: 34em
		height: 34em
		animation-name: moveSphere
		@include sphere(hsl(223,90%,55%))
		transform: translateZ(10em)
		&, &-shadow
				duration: $animDur
				timing-function: ease-in-out
				iteration-count: infinite
			border-radius: 50%
			top: calc(50% - #{$sphereDiam / 2})
			left: calc(50% - #{$sphereDiam / 2})
			width: $sphereDiam
			height: $sphereDiam
			z-index: 1
			animation-name: moveSphereShadow
			background-image: radial-gradient(100% 100% at center,rgba(0,0,0,0.2) 45%,rgba(0,0,0,0) 50%)
			transform: translateY(4em) translateZ(10em) rotateX(90deg)
		@for $s from 1 through $sphereCount
			&:nth-of-type(#{$s}), &-shadow:nth-of-type(#{$s})
				left: calc(50% - #{($sphereDiam + $spaceBetween) * (($sphereCount - ($s - 1)) - ($sphereCount / 2)) - ($spaceBetween / 2)})
				@if $s > 1
					animation-delay: ($animDur * 0.05) * ($s - 1)
// Animations
@keyframes moveSphere
	from, to
		@include moveFilter(100%,0)
		transform: translateZ(10em)
	25%, 75%
		@include moveFilter(100%,0)
		transform: translateZ(12em)
		@include moveFilter(80%,4px)
		transform: translateZ(-10em)
@keyframes moveSphereShadow
	from, to
		transform: translateY(4em) translateZ(10em) rotateX(90deg)
	25%, 75%
		transform: translateY(4em) translateZ(12em) rotateX(90deg)
		transform: translateY(4em) translateZ(-10em) rotateX(90deg)