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.


                - var h = 2000, w = 2*h;
- var x = -.5*w, y = -.5*h;
- var sw = .005*h, fs = Math.round(.075*h);
- var d = .5*h, o = -.5*d;
- var e = 1.5*o, t = Math.round(e - fs);

svg(viewBox=[x, y, w, h].join(' ') 
		| svg { color: #333; fill: currentcolor; font: #{fs}px segoe script, comic sans ms, purisa, cursive; text-anchor: middle; dominant-baseline: middle }
		| polygon ~ * { font: #{fs}px consolas, monaco, ubuntu mono, monospace }
		| [d] {
		| 	fill: none;
		| 	stroke: currentcolor;
		| 	stroke-width: #{sw}
		| }
		| [y] + [d] { color: #e52e71; stroke-width: #{2*sw} }
		| [d] ~ * { color: #ff8a00 }
	text(x=-.75*x) 1st
	text(x=.75*x) 2nd
	polygon(points=`0${o} ${-o}${o} ${-o} 0${o} 0${o} ${-o} 0 ${-o}`)
	text(x=1*fs - o y=o - 1*fs) #000
	text(x=1*fs - o y=1*fs - o) #eee
	text(x=o - 1*fs y=1*fs - o) #000
	text(x=o - 1*fs y=o - 1*fs) #eee
	path(d=`M0${e}V${-e}M${e} 0H${-e}`)
	text(y=t) 0%=100%
	text(x=-t) 25%
	text(y=-t) 50%
	text(x=t) 75%

// minimal SVG
<svg viewBox='-2000 -1000 4000 2000' xmlns=''><style>svg{color:#333;fill:currentcolor;font:150px segoe script,comic sans ms,purisa,cursive;text-anchor:middle;dominant-baseline:middle}polygon~*{font:150px consolas,monaco,ubuntu mono,monospace}[d]{fill:none;stroke:currentcolor;stroke-width:10}[y]+[d]{color:#e52e71;stroke-width:20}[d]~*{color:#ff8a00}</style><text x='1500'>1st</text><text x='-1500'>2nd</text><polygon points='0-500 500-500 500 0-500 0-500 500 0 500'/><text x='650' y='-650'>#000</text><text x='650' y='650'>#eee</text><text x='-650' y='650'>#000</text><text x='-650' y='-650'>#eee</text><path d='M-500-500H500V500H-500z'/><path d='M0-750V750M-750 0H750'/><text y='-900'>0%=100%</text><text x='900'>25%</text><text y='900'>50%</text><text x='-900'>75%</text></svg>


                body {
	display: flex;
	flex-direction: column;
	margin: 0;
	height: 100vh;