Pen Settings



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


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.


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.



- var o = -.5*d, f = .1;
- var vb_y = -2*f*d, vb_x = o + vb_y;
- var r = Math.round(.75*(1 - 2*f)*d), rd = Math.round(r/Math.sqrt(2));

svg(viewBox=[vb_x, vb_y, 2*d, d].join(' ') 
		| * { fill: #{darken}; stroke-linecap: round; font: #{fs}px consolas, monaco, monospace }
		| [d], [r] { fill: none; stroke: #{darken}; stroke-width: #{3*sw} }
		| [d] + [d] { fill: #{golden}; stroke: #{purple} }
		| [x] + [d] { stroke: #{tomato}; stroke-width: #{4*sw} }
		| [r] { fill: #{orange} }
	//-axes + helper lines
	path(d=`M${r} 0V${r}H0M${r - 2*ram} ${r}v${-2*ram}h${2*ram}M${r - ram} ${r - ram}h1`)
	path(d=`M${r} 0 H0V${r}`)
	//-edge lengths
	text(x=.5*(r - fs) y=(-.2*fs)) l
	text(x=.5*(r - fs) y=(r + .8*fs)) l
	text(x=-.8*fs y=.5*(r + .8*fs)) l
	text(x=(r + .2*fs) y=.5*(r + .8*fs)) l
	text(x=.5*(r + .8*fs) y=.5*(r + .8*fs)) d
	//-last edge
	path(d=`M${r} 0 0 ${r}`)
	//-perpendicularity sign for highlighted triangle
	path(d=`M${2*ram} 0V${2*ram}H0M${ram} ${ram}h1`)
	//-vertex points
	circle(cx=r r=pr)
	circle(cy=r r=pr)

// minimal SVG
<svg viewBox='-1750 -500 5000 2500' xmlns=''><style>*{fill:#333;stroke-linecap:round;font:150px consolas,monaco,monospace}[d],[r]{fill:none;stroke:#333;stroke-width:15}[d]+[d]{fill:#fe9;stroke:#95a}[x]+[d]{stroke:#b53;stroke-width:20}[r]{fill:#f90}</style><path d='M1500 0V1500H0M1340 1500v-160h160M1420 1420h1'/><path d='M1500 0 H0V1500'/><text x='675' y='-30'>l</text><text x='675' y='1620'>l</text><text x='-120' y='810'>l</text><text x='1530' y='810'>l</text><text x='810' y='810'>d</text><path d='M1500 0 0 1500'/><path d='M160 0V160H0M80 80h1'/><circle r='25'/><circle cx='1500' r='25'/><circle cy='1500' r='25'/></svg>


                body {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 0;
	height: 100vh;

svg { display: block }


                // minimal SVG: