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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


svg(viewBox=[-d, -.5*d, 2*d, hf*d].join(' ') 
		| * {
		| 	fill: #333;
		| 	stroke-linecap: round;
		| 	font: #{fs}px consolas, monaco, monospace
		| }
		| [x] + [d], [r]:not([r='#{hr}']) { fill: #{orange}; stroke: #{darken}; marker-end: url(#e) }
		| svg > [d], [r] { fill: none; stroke: #{llight}; stroke-width: #{2*sw} }
		| [r] + [d] { stroke-width: #{3*sw} }
		| [d] + [x] { font: italic 1em times new roman, serif }
		| [d] + [d] { stroke: #{orange}; stroke-width: #{4*sw}; mix-blend-mode: darken }
	marker#e(markerWidth=ad markerHeight=ad 
						viewBox='0 -4 8 8' 
						orient='auto' refX='7')
		path(d='M8 0 0-4V4')
	//-radius text
	text(x=-.5*(hrd + fs) y=-(.5*hrd + .2*fs)) R
	text(x=.5*(hrd - .2*fs) y=-(.5*hrd + .2*fs)) R
	text(x=.5*(-3*hrd - fs) y=(.5*hrd - .2*fs)) R
	text(x=.5*(3*hrd - .2*fs) y=(.5*hrd - .2*fs)) R
	path(d=`M${-ax} 0H${ax}`)
	text(x=ax - .5*fs y=-.5*fs) x
	text(x=.4*fs y=(hf*ax - .2*fs)) y
	//-helper circles
	circle(cx=-hrd r=hr)
	circle(cx=hrd r=hr)
	//-diameter & tangent lines
	path(d=`M${-2*hrd - ram} ${hrd - ram}l${ram} ${-ram} ${ram} ${ram}
					M${-2*hrd} ${hrd} 0${-hrd} ${2*hrd} ${hrd}
					M${-2*hrd} ${hrd - ram}h1
					M${2*hrd + ram} ${hrd - ram}l${-ram} ${-ram} ${-ram} ${ram}
					M${-2.5*hrd} ${.5*hrd} 0 ${3*hrd} ${2.5*hrd} ${.5*hrd}
					M${2*hrd} ${hrd - ram}h1`)
	//-heart shape
	path(d=`M${-2*hrd} ${hrd}
					A${hr} ${hr} 0 0 1 0 ${-hrd}
					A${hr} ${hr} 0 0 1 ${2*hrd} ${hrd}
					C0 ${3*hrd} 0 ${3*hrd} ${-2*hrd} ${hrd}`)
	//-highlighted points
	circle(cx=-hrd r=pr2)
	circle(cx=hrd r=pr2)
	circle(cy=-hrd r=pr)
	circle(cy=3*hrd r=pr1)
	circle(cx=-2*hrd cy=-hrd r=pr)
	circle(cx=2*hrd cy=-hrd r=pr)
	circle(cx=-2*hrd cy=hrd r=pr)
	circle(cx=2*hrd cy=hrd r=pr)

// minimal SVG
<svg viewBox='-2500 -1250 5000 3125' xmlns='http://www.w3.org/2000/svg'><style>*{fill:#333;stroke-linecap:round;font:150px consolas,monaco,monospace}[x]+[d],[r]:not([r='625']){fill:#f90;stroke:#333;marker-end:url(#e)}svg>[d],[r]{fill:none;stroke:#ccc;stroke-width:10}[r]+[d]{stroke-width:15}[d]+[x]{font:italic 1em times new roman,serif}[d]+[d]{stroke:#f90;stroke-width:20;mix-blend-mode:darken}</style><marker id='e' markerWidth='10' markerHeight='10' viewBox='0 -4 8 8' orient='auto' refX='7'><path d='M8 0 0-4V4'/></marker><text x='-296' y='-251'>R</text><text x='206' y='-251'>R</text><text x='-738' y='191'>R</text><text x='648' y='191'>R</text><path d='M-1230 0H1230'/><text x='1155' y='-75'>x</text><path d='M0-1230V1538'/><text x='60' y='1508'>y</text><circle cx='-442' r='625'/><circle cx='442' r='625'/><path d='M-964 362l80-80 80 80M-884 442 0-442 884 442M-884 362h1M964 362l-80-80-80 80M-1105 221 0 1326 1105 221M884 362h1'/><path d='M-884 442A625 625 0 0 1 0-442A625 625 0 0 1 884 442C0 1326 0 1326-884 442'/><circle cx='-442' r='13'/><circle cx='442' r='13'/><circle cy='-442' r='25'/><circle cy='1326' r='18'/><circle cx='-884' cy='-442' r='25'/><circle cx='884' cy='-442' r='25'/><circle cx='-884' cy='442' r='25'/><circle cx='884' cy='442' r='25'/></svg>
              body {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 0;
	height: 100vh;

svg { display: block }
              // minimal SVG: https://codepen.io/thebabydino/pen/JrwVNZ/?editors=1000
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.