Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                mixin did(n, begin=true)
	.r(data-n=`${n}` data-begin=(begin ? "" : undefined ) style=`--n: ${n}; ${begin ? `--begin: ${n};` : ``}`)
		if (n > 0)
			+did(n - 1, false)
			
+did(15)
              
            
!

CSS

              
                html, body { min-height: 100%; }
html { display: flex; }
body { 
	display: flex;
	flex: 1;
	overflow: hidden;
	align-items: center;
	justify-content: center;
}

@keyframes opacity {
	0% { opacity: 0; }
	100% { opacity: 1; }
}
@keyframes angle {
	0% { --angle: 0deg; }
	100% { --angle: 360deg; }
}
body {
	background: #000;
	color: #fff;
}
.r {
	background: conic-gradient(from var(--angle, 0deg), #f00 3.333%, #f30 3.333%, #f30 6.667%, #f60 6.667%, #f60 10.000%, #f90 10.000%, #f90 13.333%, #fc0 13.333%, #fc0 16.667%, #ff0 16.667%, #ff0 20.000%, #cf0 20.000%, #cf0 23.333%, #9f0 23.333%, #9f0 26.667%, #6f0 26.667%, #6f0 30.000%, #3f0 30.000%, #3f0 33.333%, #0f0 33.333%, #0f0 36.667%, #0f3 36.667%, #0f3 40.000%, #0f6 40.000%, #0f6 43.333%, #0f9 43.333%, #0f9 46.667%, #0fc 46.667%, #0fc 50.000%, #0ff 50.000%, #0ff 53.333%, #0cf 53.333%, #0cf 56.667%, #09f 56.667%, #09f 60.000%, #06f 60.000%, #06f 63.333%, #03f 63.333%, #03f 66.667%, #00f 66.667%, #00f 70.000%, #30f 70.000%, #30f 73.333%, #60f 73.333%, #60f 76.667%, #90f 76.667%, #90f 80.000%, #c0f 80.000%, #c0f 83.333%, #f0f 83.333%, #f0f 86.667%, #f0c 86.667%, #f0c 90.000%, #f09 90.000%, #f09 93.333%, #f06 93.333%, #f06 96.667%, #f03 96.667%, #f03 100.000%);
	border-radius: 100%;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	--duration: calc(10 + var(--n));
	animation: angle calc(var(--duration) * 1s) infinite linear;
	animation-delay: calc(
		(var(--duration) / var(--begin)) *
		(var(--begin) - var(--n)) *
		-1s
	);
}
.r[data-begin] {
	width: 100vmin;
	height: 100vmin;
}
@element .r {
	:self > .r {
		width: 75ew;
		height: 75ew;
	}
}
.r .r:after {
	content: "";
	background: #fff;
	background: currentColor;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	opacity: 0;
	animation: opacity 1s paused linear both;
	animation-delay: calc(
		((50 / var(--begin)) * (var(--begin) - var(--n))) 
		* 0.01 * -1s
	);
	border-radius: inherit;
}
.r[data-begin]:after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image:
		radial-gradient(circle, #fff, transparent 50%);
	background-image:
		radial-gradient(circle, currentColor, transparent 50%);
}
              
            
!

JS

              
                CSS.registerProperty({
  name: '--angle',
  syntax: '<angle>',
  inherits: false,
  initialValue: '0deg',
	animatable: true
})
              
            
!
999px

Console