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

              
                .dots
	-for(var i = 1; i <= 16; i++)
		.dot-track
			.dot

a.codepen-link(href='https://www.codepen.io/seanfree' target='_blank')
              
            
!

CSS

              
                $angle: 0
$color: rgba(255,0,0,1)

body
	background: #0a0a0a
	height: 100vh

.dots
	position: absolute
	top: calc(50% - 250px)
	left: calc(50% - 250px)
	width: 500px
	height: 500px

.dot-track
	position: absolute
	width: 200px
	height: 12px
	border-radius: 6px
	transform-origin: -15% 50%
	
	.dot
		position: absolute
		width: 12px
		height: 12px
		border-radius: 6px
		transform-origin: 50% 50%
		animation: move-dot 2s ease-in-out infinite
	
	@for $i from 1 through 16
		&:nth-of-type(#{$i})
			$background: adjust-hue($color, $angle)
			background-color: darken($background, 40%)
			transform: translateX(275px) translateY(250px) rotate($angle + deg)
			
			.dot
				background-color: $background
				animation-delay: $angle/60 * -1s
	
		$angle: ($i/16) * 360
	

.codepen-link
	position: absolute
	bottom: 30px
	right: 30px
	height: 40px
	width: 40px
	z-index: 10
	border-radius: 50%
	box-sizing: border-box
	background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/544318/logo.jpg')
	background-position: center center
	background-size: cover
	opacity: 0.4
	transition: all 0.25s

	&:hover
		opacity: 0.8
		box-shadow: 0 0 6px #efefef
	
@keyframes move-dot
	50%
		transform: translateX(188px)
              
            
!

JS

              
                //Based on this gif: http://gph.is/1sCpdDh
              
            
!
999px

Console