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.


                - let t = .5;

svg(viewBox='-115 -100 230 200')
			feFuncR(type="linear" slope=t)
			feFuncG(type="linear" slope=t)
			feFuncB(type="linear" slope=t)
		path.arr(d=`M0,-95 v190 m-2,-5 2,1 2,-1 -2,5z
								M-110,0 h220 m-5,2 1,-2 -1,-2 5,2z`)
		text(x=105 y=8) x
		text(x=3 y=95) y
	path#square(d=`M-50,-50 v100 h100 v-100`)
		path.arr(d=`M50,50 v-100 m2,5 -2,-1 -2,1 2,-5z`)
		circle(cx=50 cy=-50 r=2)
		g.lbl(style=`--pos: translate(51px, 0)`)
			rect(y=-8 width=42 height=16 rx=2)
			text(x=1 y=3) dy: -100
		path.arr(d=`M-50,50 h100 m-5,2 1,-2 -1,-2 5,2z`)
		circle(cx=50 cy=50 r=2)
		g.lbl(style=`--pos: translate(0, 51px)`)
			rect(x=-18 width=36 height=16 rx=2)
			text(y=11 text-anchor='middle') dx: 100
		path.arr(d=`M-50,-50 v100 m-2,-5 2,1 2,-1 -2,5z`)
		circle(cx=-50 cy=50 r=2)
		g.lbl(style=`--pos: translate(-51px, 0)`)
			rect(x=-36 y=-8 width=36 height=16 rx=2)
			text(x=-1 y=3 text-anchor='end') dy: 100
		circle(cx=-50 cy=-50 r=2)
		g.lbl(style=`--pos: translate(-53px, -50px)`)
			rect(x=-39 y=-15 width=39 height=16 rx=2)
			text(x=-1 y=-4 text-anchor='end') -50,-50

	span.token--prop d
	span.token--punc :
		span.token--func path
		span.token--punc (
		span.token--str '
			span.token--cmd.trig(data-comp='0') M-50,50
			span.token--cmd.trig(data-comp='1') v100
			span.token--cmd.trig(data-comp='2') h100
			span.token--cmd.trig(data-comp='3') v-100
		| '
		span.token--punc )


                $c: #ff8a00 /*#f44336*/ #e52e71 /*#9c27b0*/ #03a9f4 /*#4caf50*/ #8bc34a;
$n: length($c);

* { margin: 0; font: inherit }

body {
	--c: #efefef;
	display: grid;
	grid-template-rows: 1fr max-content;
	height: 100vh;
	font: 5vw/ 1.375 ubuntu mono, consolas, monaco, monospace;
	@media (min-width: 640px) { font-size: 2rem }

svg {
	place-self: center;
	max-width: 640px;
	font-size: 10px;
	word-spacing: -4px

rect, circle { fill: var(--c) }

circle { stroke: #333; stroke-width: .5 }

[id='orig'] {
	color: #aaa;
	font-family: times new roman, serif;
	font-style: italic;
	text { fill: currentcolor }

[id='square'] {
	fill: darkorange;
	opacity: .2

.trig { cursor: pointer }

@for $i from 0 to $n {
	[data-comp='#{$i}'] { --c: #{mix(#fff, nth($c, $i + 1), 35%)} }

.lbl {
	transform: var(--pos) scale(0);
	.hl & { transform: var(--pos) }

.arr {
	fill: var(--c);
	stroke: var(--c);
	stroke-miterlimit: 6;
	filter: url(#b)

pre {
	overflow-x: hidden;
	padding: .125em;
	background: #100e17;
	color: #fff;
	word-spacing: -.375em

span {
	display: inline-block;
	padding: 0 .125em;
	border-radius: 5px;
	color: var(--c);
	.hl {
		color: #101010;
		background: var(--c)


                let hl = null;

function trigger(_el) {
	if(_el.classList.contains('trig')) return _el;
	else {
		if(_el !== document.body) return trigger(_el.parentNode);
		return null;

addEventListener('mouseover', e => {
	let _t = trigger(;
	if(_t) {
		let comp = +_t.dataset.comp;
		hl = [...document.querySelectorAll(`[data-comp='${comp}']`)];
		hl.forEach(c => c.classList.add('hl'))
}, false);

addEventListener('mouseout', e => {
	let _t = trigger(;
	if(_t) {
		hl.forEach(c => c.classList.remove('hl'))
}, false);