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

Packages

Add 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 or require. We'll also process your JavaScript with Babel.

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

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.

            
              - var d = 2000;
- var w = 2*d, h = 1.25*d;
- var u = .25*d;
- var r = .43*u;
- var sw = .003*d, fs = Math.round(.065*d);
- var na = Math.round(.05*fs);

svg(viewBox=[-.5*w, -.5*h, w, h].join(' ')
		xmlns='http://www.w3.org/2000/svg' 
		xmlns:xlink='http://www.w3.org/1999/xlink')
	style
		| * {
		| 	fill: #333;
		| 	font: #{fs}px consolas, monaco, monospace;
		| }
		| g [d] {
		| 	fill: none;
		| 	stroke: #ccc;
		| 	stroke-width: #{sw}
		| }
		| g [d] + * {
		| 	stroke: #b53;
		| 	stroke-width: #{2*sw}
		| }
		| g [d] + * + * {
		| 	stroke: #333;
		| 	stroke-width: #{1.5*sw};
		| 	marker-start: url(#s);
		| 	marker-end: url(#e);
		| }
		| #h ~ * {
		| 	fill: #b53;
		| 	font: 700 #{fs}px comic sans ms, cursive
		| }
	marker#s(markerWidth=na markerHeight=na 
						viewBox='-8 -4 8 8' orient='auto' refX='-7')
		path(d='M-8 0 0-4V4')
	marker#e(markerWidth=na markerHeight=na 
					 viewBox='0 -4 8 8' orient='auto' refX='7')
		path(d='M8 0 0-4V4')
	text(x=u + 4.1*fs y=.3*fs) 100%
	text(x=-(u + 6.3*fs) y=.3*fs) 100%
	text(x=-fs y=-(u + 4.2*fs)) 100%
	text(x=-fs y=u + 4.9*fs) 100%
	g#a
		text(x=u + 1.1*fs y=.4*fs - .5*u) 50%
		text(x=u + 1.1*fs y=.5*u + .4*fs) 50%
	g#b
		text(x=-(.5*u + .8*fs) y=u + 1.9*fs) 50%
		text(x=.5*u - .8*fs y=u + 1.9*fs) 50%
	use(xlink:href='#a' x=-(2*u + 3.9*fs))
	use(xlink:href='#b' y=-(2*u + 3.1*fs))
	g#h
		g#q
			path(d=`M0 0H${u + 2.5*fs}M0 ${u}H${u + 5*fs}
							M0 0V${u + 2.5*fs}M${u} 0V${u + 5*fs}`)
			path(d=`M0 0H${u}V${u - r}A${r} ${r} 0 0 0 ${u - r} ${u}H0z`)
			path(d=`M0 ${u + fs}H${u}`)
			path(d=`M${u + fs} 0V${u}`)
			path(d=`M${-u} ${u + 4*fs}H${u}`)
			path(d=`M${u + 4*fs}${-u}V${u}`)
		use(xlink:href='#q' transform='scale(1 -1)')
	use(xlink:href='#h' transform='scale(-1 1)')
	text(x=-(.5*u + .8*fs) y=.4*fs - .5*u) 1st
	text(x=.5*u - .8*fs y=.4*fs - .5*u) 2nd
	text(x=-(.5*u + .8*fs) y=.4*fs + .5*u) 3rd
	text(x=.5*u - .8*fs y=.4*fs + .5*u) 4th

// minimal SVG
<svg viewBox='-2000 -1250 4000 2500' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><style>*{fill:#333;font:130px consolas,monaco,monospace;}g [d]{fill:none;stroke:#ccc;stroke-width:6}g [d]+*{stroke:#b53;stroke-width:12}g [d]+*+*{stroke:#333;stroke-width:9;marker-start:url(#s);marker-end:url(#e);}#h~*{fill:#b53;font:700 130px comic sans ms,cursive}</style><marker id='s' markerWidth='7' markerHeight='7' viewBox='-8 -4 8 8' orient='auto' refX='-7'><path d='M-8 0 0-4V4'/></marker><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='1033' y='39'>100%</text><text x='-1319' y='39'>100%</text><text x='-130' y='-1046'>100%</text><text x='-130' y='1137'>100%</text><g id='a'><text x='643' y='-198'>50%</text><text x='643' y='302'>50%</text></g><g id='b'><text x='-354' y='747'>50%</text><text x='146' y='747'>50%</text></g><use xlink:href='#a' x='-1507'/><use xlink:href='#b' y='-1403'/><g id='h'><g id='q'><path d='M0 0H825M0 500H1150M0 0V825M500 0V1150'/><path d='M0 0H500V285A215 215 0 0 0 285 500H0z'/><path d='M0 630H500'/><path d='M630 0V500'/><path d='M-500 1020H500'/><path d='M1020-500V500'/></g><use xlink:href='#q' transform='scale(1-1)'/></g><use xlink:href='#h' transform='scale(-1 1)'/><text x='-354' y='-198'>1st</text><text x='146' y='-198'>2nd</text><text x='-354' y='302'>3rd</text><text x='146' y='302'>4th</text></svg>
            
          
!
            
              body {
	display: flex;
	flex-direction: column;
	margin: 0;
	height: 100vh;
}
            
          
!
999px

Console