css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.


- var f = .7, ay = f*ax;
- d *= f , fs *= f, ad *=f, sw *=f, pr *= f, pr1 *= f, pr2 *= f, ram *= f;

svg(viewBox=[-d, -(.57*d).toFixed(e), 2*d, d].join(' ') 
		| svg { fill: #333; font: #{fs}px consolas, monaco, monospace }
		| svg > [d], [r] { fill: none; stroke: #ccc; stroke-linecap: round; stroke-width: #{2*sw} }
		| [y] + [d] { stroke: #333; marker-end: url(#e) }
		| [d] + [d] ~ [r] { fill: #f90; stroke: #333 }
		| [d] + [y], #e * {  font: #{fs}px times new roman, serif }
		| [r] + [d] { stroke: #f90; stroke-width: #{4*sw} }
		| [d] + [d] { stroke: #95a; stroke-width: #{~~(3*sw)} }
		| [d] ~ [y] { font-style: italic }
		| tspan { font-size: .5em }
	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)).toFixed(e) y=-(.5*hrd - .8*fs)) R
	text(x=(.5*(hrd - fs)).toFixed(e) y=-(.5*hrd - .8*fs)) R
	text(x=(-1.5*hrd).toFixed(e) y=(.5*hrd + .8*fs)) R
	text(x=(.5*(3*hrd - fs)).toFixed(e) y=(.5*hrd + .8*fs)) R
	text(x=(.5*(-3*hrd - .2*fs)).toFixed(e) y=-(.5*hrd + .2*fs)) R
	text(x=(.5*(3*hrd - fs)).toFixed(e) y=-(.5*hrd + .2*fs)) R
	path(d=`M${-(1.25*ax).toFixed(e)} 0H${(1.25*ax).toFixed(e)}`)
	text(x=(1.25*ax - .5*fs).toFixed(e) y=(-.5*fs).toFixed(e)) x
	text(x=.4*fs y=(.87*ay - .2*fs).toFixed(e)) y
	//-helper circles
	circle(cx=-hrd r=hr)
	circle(cx=hrd r=hr)
					M${-2*hrd} ${hrd}V${-hrd}H${2*hrd}V${hrd}`)
	path(d=`M${hrd} 0
					l${-hrd}${-hrd} ${hrd}${-hrd} ${2*hrd} ${2*hrd}${-hrd} ${hrd}${-hrd}${-hrd} ${hrd}${-hrd}
					M${-hrd} 0
					l${hrd}${-hrd}${-hrd}${-hrd}${-2*hrd} ${2*hrd} ${hrd} ${hrd} ${hrd}${-hrd}${-hrd}${-hrd}
					M${-(hrd + ram)} ${ram}l${-ram}${-ram} ${2*ram} ${-2*ram} ${ram} ${ram}
					M${-(hrd + ram)} 0h1M${-hrd}${-ram}h1
					M${hrd + ram} ${ram}l${ram}${-ram}${-2*ram} ${-2*ram}${-ram} ${ram}
					M${hrd + ram} 0h1M${hrd}${-ram}h1
					M${-(2*hrd - ram)} ${-(ram + hrd)}l${ram} ${ram} ${-2*ram} ${2*ram}${-ram} ${-ram}
					M${-(2*hrd - ram)} ${-hrd}h1M${-2*hrd}${ram - hrd}h1
					M${2*hrd - ram} ${-(ram + hrd)}l${-ram} ${ram} ${2*ram} ${2*ram} ${ram} ${-ram}
					M${2*hrd - ram} ${-hrd}h1M${2*hrd}${ram - hrd}h1
					M${-(2*hrd - ram)} ${hrd - ram}l${-ram}${-ram}${-ram} ${ram}
					M${-2*hrd} ${hrd - ram}h1
					M${2*hrd - ram} ${hrd - ram}l${ram}${-ram} ${ram} ${ram}
					M${2*hrd} ${hrd - ram}h1
					M${-ram}${-(ram + hrd)}l${-ram} ${ram} ${ram} ${ram}
					M${ram}${-(ram + hrd)}l${ram} ${ram}${-ram} ${ram}
	circle(cx=-hrd r=+pr2.toFixed(e))
	circle(cx=hrd r=+pr2.toFixed(e))
	circle(cy=-hrd r=+pr.toFixed(e))
	circle(cx=-2*hrd cy=-hrd r=+pr.toFixed(e))
	circle(cx=2*hrd cy=-hrd r=+pr.toFixed(e))
	circle(cx=-2*hrd cy=hrd r=+pr.toFixed(e))
	circle(cx=2*hrd cy=hrd r=+pr.toFixed(e))
	circle(cx=-3*hrd r=+pr1.toFixed(e))
	circle(cx=3*hrd r=+pr1.toFixed(e))
	circle(cx=-hrd cy=-2*hrd r=+pr1.toFixed(e))
	circle(cx=hrd cy=-2*hrd r=+pr1.toFixed(e))
	//-point names
	text(y=-(hrd + .5*fs).toFixed(e)) T
	text(x=hrd - .4*fs y=fs) O<tspan>0</tspan>
	text(x=-(hrd + .4*fs) y=fs) O<tspan>1</tspan>
	text(x=2*hrd - .2*fs y=-(hrd + .4*fs)) A<tspan>0</tspan>
	text(x=-(2*hrd + .6*fs) y=-(hrd + .4*fs)) A<tspan>1</tspan>
	text(x=2*hrd - .2*fs y=(hrd + fs)) B<tspan>0</tspan>
	text(x=-(2*hrd + .6*fs) y=(hrd + fs)) B<tspan>1</tspan>
	text(x=hrd - .2*fs y=-(2*hrd + .4*fs)) D<tspan>0</tspan>
	text(x=-(hrd + .6*fs) y=-(2*hrd + .4*fs)) D<tspan>1</tspan>
	text(x=3*hrd - .4*fs y=fs) E<tspan>0</tspan>
	text(x=-(3*hrd + .4*fs) y=fs) E<tspan>1</tspan>

// minimal SVG
<svg viewBox='-1750 -997 3500 1750' xmlns='http://www.w3.org/2000/svg'><style>svg{fill:#333;font:105px consolas,monaco,monospace}svg>[d],[r]{fill:none;stroke:#ccc;stroke-linecap:round;stroke-width:7}[y]+[d]{stroke:#333;marker-end:url(#e)}[d]+[d]~[r]{fill:#f90;stroke:#333}[d]+[y],#e *{font:105px times new roman,serif}[r]+[d]{stroke:#f90;stroke-width:14}[d]+[d]{stroke:#95a;stroke-width:10}[d]~[y]{font-style:italic}tspan{font-size:.5em}</style><marker id='e' markerWidth='7' markerHeight='7' viewBox='0 -4 8 8' orient='auto' refX='7'><path d='M8 0 0-4V4'/></marker><text x='-221' y='-137'>R</text><text x='169' y='-137'>R</text><text x='-663' y='305'>R</text><text x='611' y='305'>R</text><text x='-674' y='-242'>R</text><text x='611' y='-242'>R</text><path d='M-1538 0H1538'/><text x='1485' y='-53'>x</text><path d='M0-861V749'/><text x='42' y='728'>y</text><circle cx='-442' r='625'/><circle cx='442' r='625'/><path d='M442-884V0h884M-442-884V0h-884M-884 442V-442H884V442'/><path d='M442 0l-442-442 442-442 884 884-442 442-442-442 442-442M-442 0l442-442-442-442-884 884 442 442 442-442-442-442M-498 56l-56-56 112-112 56 56M-498 0h1M-442-56h1M498 56l56-56-112-112-56 56M498 0h1M442-56h1M-828-498l56 56-112 112-56-56M-828-442h1M-884-386h1M828-498l-56 56 112 112 56-56M828-442h1M884-386h1M-828 386l-56-56-56 56M-884 386h1M828 386l56-56 56 56M884 386h1M-56-498l-56 56 56 56M-56-442h1M56-498l56 56-56 56M56-442h1'/><circle cx='-442' r='9'/><circle cx='442' r='9'/><circle cy='-442' r='18'/><circle cx='-884' cy='-442' r='18'/><circle cx='884' cy='-442' r='18'/><circle cx='-884' cy='442' r='18'/><circle cx='884' cy='442' r='18'/><circle cx='-1326' r='13'/><circle cx='1326' r='13'/><circle cx='-442' cy='-884' r='13'/><circle cx='442' cy='-884' r='13'/><text y='-495'>T</text><text x='400' y='105'>O<tspan>0</tspan></text><text x='-484' y='105'>O<tspan>1</tspan></text><text x='863' y='-484'>A<tspan>0</tspan></text><text x='-947' y='-484'>A<tspan>1</tspan></text><text x='863' y='547'>B<tspan>0</tspan></text><text x='-947' y='547'>B<tspan>1</tspan></text><text x='421' y='-926'>D<tspan>0</tspan></text><text x='-505' y='-926'>D<tspan>1</tspan></text><text x='1284' y='105'>E<tspan>0</tspan></text><text x='-1368' y='105'>E<tspan>1</tspan></text></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/XeLRLV?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.
Loading ..................