Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

            
              [[[https://codepen.io/thebabydino/pen/zEbVPO]]]

- var o = -.5*d, f = .1;
- var vb_y = -f*d, vb_x = o + vb_y;
- var ax0 = +((1 - k)*vb_y).toFixed(e);
- var ax1 = +((1 - k)*(d + vb_y)).toFixed(e);
- var r = +(.75*ax1).toFixed(e), rd = +(r/Math.sqrt(2)).toFixed(e);
- var dr = ax1 - r, c = Math.round(.551915*r);

svg(viewBox=[vb_x, vb_y, 2*d, d].join(' ') 
		xmlns='http://www.w3.org/2000/svg')
	style
		| * { fill: #{darken}; stroke-linecap: round; font: #{fs}px consolas, monaco, monospace }
		| [d], [r] { fill: none; stroke: #{orange}; stroke-width: #{2*sw} }
		| [x] + [d] { stroke: #{llight} }
		| [d*=A], [d*=h] { stroke-width: #{4*sw} }
		| [d*=A] { stroke: #{orange} }
		| [d*=A] + * { stroke: #{purple}; stroke-width: #{3*sw} }
		| [r] { fill: #{orange}; stroke: #{darken} }
		| [r] + * { word-spacing: #{-.35*fs}px }
		| [r] + [x] ~ * { font-style: italic }
	//-radius text on axes
	text(x=.5*(r - fs) y=-.2*fs) R
	//-axes + helper lines
	path(d=`M${ax0} 0H${ax1}M0${ax0}V${ax1}M${2*ram} 0V${2*ram}H0M${r - 2*ram} 0V${2*ram}H${r}M${2*ram} ${r}V${r - 2*ram}H0M${r} 0V${r}H0`)
	//-radius text on axes
	text(x=-.8*fs y=.5*(r + fs)) R
	//-perpendic dots
	path(d=`M${ram} ${ram}h1M${r - ram} ${ram}h1M${ram} ${r - ram}h1`)
	//-arc
	path(d=`M${r} 0A${r} ${r} 0 0 1 0 ${r}`)
	//-ctrl points guides
	path(d=`M${r} 0V${c}M0 ${r}H${c}`)
	//-meas
	text(x=(.5*c - fs) y=(r + .8*fs)) C·R
	text(x=(r + .2*fs) y=(.5*c + .4*fs)) C·R
	//-hl circles
	circle(r=pr1)
	circle(cx=r r=pr)
	circle(cy=r r=pr)
	circle(cx=r cy=c r=pr)
	circle(cx=c cy=r r=pr)
	circle(cx=r cy=r r=Math.round(.5*pr))
	//-legend
	text(x=ax1 y=ax1) C = .551915
	//-point names
	text(x=-.8*fs y=-.2*fs) O
	text(x=r - .2*fs y=-.3*fs) N
	text(x=r + .1*fs y=r + .6*fs) P
	text(x=-.8*fs y=r + .2*fs) Q

// minimal SVG
<svg viewBox='-1500 -250 5000 2500' xmlns='http://www.w3.org/2000/svg'><style>*{fill:#333;stroke-linecap:round;font:150px consolas,monaco,monospace}[d],[r]{fill:none;stroke:#f90;stroke-width:10}[x]+[d]{stroke:#ccc}[d*=A],[d*=h]{stroke-width:20}[d*=A]{stroke:#f90}[d*=A]+*{stroke:#95a;stroke-width:15}[r]{fill:#f90;stroke:#333}[r]+*{word-spacing:-53px}[r]+[x]~*{font-style:italic}</style><text x='727' y='-30'>R</text><path d='M-238 0H2138M0-238V2138M160 0V160H0M1444 0V160H1604M160 1604V1444H0M1604 0V1604H0'/><text x='-120' y='877'>R</text><path d='M80 80h1M1524 80h1M80 1524h1'/><path d='M1604 0A1604 1604 0 0 1 0 1604'/><path d='M1604 0V885M0 1604H885'/><text x='293' y='1724'>C·R</text><text x='1634' y='503'>C·R</text><circle r='18'/><circle cx='1604' r='25'/><circle cy='1604' r='25'/><circle cx='1604' cy='885' r='25'/><circle cx='885' cy='1604' r='25'/><circle cx='1604' cy='1604' r='13'/><text x='2138' y='2138'>C = .551915</text><text x='-120' y='-30'>O</text><text x='1574' y='-45'>N</text><text x='1619' y='1694'>P</text><text x='-120' y='1634'>Q</text></svg>
            
          
!

CSS

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

svg { display: block }
            
          
!

JS

            
              // minimal SVG: https://codepen.io/thebabydino/pen/pWqXLo?editors=1000
            
          
!
999px

Console