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.


	- (1..8) .each do |i|
			- (1..36).each do |j|
%span.notice Inspired by "Mazes for Programmers"


                @import bourbon

$raw-diameter: 400
$diameter: $raw-diameter * 1px
$cells: 36
$circles: 8
$cell-depth: ($raw-diameter/2)/$circles
$cell-depth-px: $cell-depth * 1px
$subdivide-at: 4

$color-bg: linear-gradient(#990073, #80dfff)
$color-ground: radial-gradient(#99bbff 30%, #990098 80%, #000 100%)
$color-wall: gold
$color-title: red

$pi: 3.1415926535

=block($w, $h)
	display: block
	width: $w
	height: $h

	background: $color-bg
	min-height: 100vh
	font-family: 'Ubuntu', sans-serif
	color: white

	color: $color-title
	text-align: center

	+block($diameter, $diameter)
	position: absolute
	border: 5px solid $color-wall
	background: $color-ground
	border-radius: 50%
	top: 50vh
	left: 50vw
	+transform(translateX(-50%) translateY(-50%))

	+block($diameter, $diameter)
	//border: 2px solid yellow
	border-radius: 50%
	position: absolute
	top: 0

@for $i from 1 through $circles
	$local-cells: $cells/ceil($i/$subdivide-at)
	$rot: 360deg/$local-cells
		$scale: ($diameter - ($i - 1)*($cell-depth*2))/$diameter
		$inv-scale: $diameter/($diameter - ($i - 1)*($cell-depth*2))
		+transform(scale($scale) translateX($i * -1px))
			+block((($diameter - ($cell-depth-px*$inv-scale)*2)*$pi)/$local-cells, $cell-depth-px*$inv-scale)
			border-width: $i * 1.1px !important
				height: $i * 1px !important

		$group-count: 0
		@for $j from 1 through $local-cells
				+transform(rotate($rot * ($j - 1) ))
				+transform-origin(0 $diameter/2)
		@for $j from 0 through $local-cells
			$toss: random(2)
			@if $toss == 1
				$group-count: $group-count + 1
				.circle__cell:nth-child(#{$local-cells - $j}) .circle__cell-walls
					border-left: 0
						+transform(rotate(4.5deg + ceil($i/$subdivide-at)))
				$break: random($group-count + 1)
				$group-count: 0
				.circle__cell:nth-child(#{$local-cells - $j + $break - 1}) .circle__cell-walls
						display: none

		.circle__cell:nth-child(#{$local-cells}) + .circle__cell
			display: none
	// hides the inner-most circle
	.circle:nth-child(#{$circles - 1}),
		display: none

	+block(($diameter*$pi)/$cells, $cell-depth-px)
	position: absolute
	left: 50%

	+block(100%, 100%)
	box-sizing: border-box
	border-left: 1px solid $color-wall
	position: relative
		content: ''
		+block(100%, 2px)
		background: $color-wall
		position: absolute
		bottom: 0
		left: 0