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

            
              - var d = 2000, o = -.6*d, h = .1*d;
- var x = .5*d, y = .5*h;
- var sw = .005*d, fs = .07*d;
- var na = Math.round(.0625*fs), pa = .2*h;

svg(viewBox=[-d, o, 2*d, d].join(' ')
		xmlns='http://www.w3.org/2000/svg' 
		xmlns:xlink='http://www.w3.org/1999/xlink')
	style
		| svg > [d], g [d], #p {
		| 	fill: none;
		| 	stroke: #ccc;
		| 	stroke-width: #{sw}
		| }
		| * { font: #{fs}px comic sans ms, noteworthy, dancing script ot, ubuntu, cursive }
		| [x], marker, #g ~ * { fill: #b53 }
		| #p { stroke: #f90 }
		| #p + * { stroke: #95a }
		| g [x] + [d] { fill: url(#p); stroke: none }
		| g [d] + *, g ~ [d] { stroke: #b53 }
		| #g ~ * {
		| 	font: 700 #{fs}px courier new, monospace
		| }
		| g ~ [d] {
		|		marker-start: url(#s);
		|		marker-end: url(#e);
		| }
		| use ~ * + [d], use ~ [x] + * { filter: url(#f) }
	path(d=`M${-x} 0V${3.5*h}M${x} 0V${3.5*h}`)
	filter#f(filterUnits='userSpaceOnUse' width='200%' x='-50%')
		feColorMatrix(values='.3 .3 .3 0 0 .3 .3 .3 0 0 .3 .3 .3 0 0 0 0 0 1 0')
	pattern#p(width=pa height=pa patternUnits='userSpaceOnUse')
		path(d=`M0 0l${pa} ${pa}`)
	path(d=`M${-x}${-y}V${y}H${x}V${-y}z`)
	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=.5*x + h - d y=-(3.5*h + 2.4*fs)) initial
	text(x=.5*x y=-(3.5*h + 2.4*fs)) final
	g#g
		text(x=.3*x y=-(3.5*h + 1.2*fs)) left thumb edge
		text(x=.5*x y=-3.5*h) position
		path(d=`M${x - h}${-y}V${y}h${h}V${-y}`)
		path(d=`M${x - h}${-3*h}V${2*h}
						M${x - .5*h}${-2.75*h}
						q${-.75*h} ${.25*h} 0 ${.5*h}
						M${x - .75*h}${-2.5*h}
						q${3*h} 0 ${h}${-1.25*h}`)
	use(xlink:href='#g' x=h - d)
	path(d=`M${-x}${-1.5*h}h${d - h}`)
	path(d=`M${x} ${1.5*h}h${.8*h}
					M${x - 1.8*h} ${1.5*h}h${.8*h}`)
	path(d=`M${-x} ${3*h}h${d}`)
	text(x=-(.9*fs + .5*h) y=-1.7*h) 1-k
	text(x=-.3*fs y=3.6*h) 1
	text(x=x - .5*h - .3*fs y=1.7*h) k

// minimal SVG
<svg viewBox='-2000 -1200 4000 2000' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><style>svg>[d],g [d],#p{fill:none;stroke:#ccc;stroke-width:10}*{font:140px comic sans ms,noteworthy,dancing script ot,ubuntu,cursive}[x],marker,#g~*{fill:#b53}#p{stroke:#f90}#p+*{stroke:#95a}g [x]+[d]{fill:url(#p);stroke:none}g [d]+*,g~[d]{stroke:#b53}#g~*{font:700 140px courier new,monospace}g~[d]{marker-start:url(#s);marker-end:url(#e)}use~*+[d],use~[x]+*{filter:url(#f)}</style><path d='M-1000 0V700M1000 0V700'/><filter id='f' filterUnits='userSpaceOnUse' width='200%' x='-50%'><feColorMatrix values='.3 .3 .3 0 0 .3 .3 .3 0 0 .3 .3 .3 0 0 0 0 0 1 0'></feColorMatrix></filter><pattern id='p' width='40' height='40' patternUnits='userSpaceOnUse'><path d='M0 0l40 40'/></pattern><path d='M-1000-100V100H1000V-100z'/><marker id='s' markerWidth='9' markerHeight='9' viewBox='-8 -4 8 8' orient='auto' refX='-7'><path d='M-8 0 0-4V4'/></marker><marker id='e' markerWidth='9' markerHeight='9' viewBox='0 -4 8 8' orient='auto' refX='7'><path d='M8 0 0-4V4'/></marker><text x='-1300' y='-1036'>initial</text><text x='500' y='-1036'>final</text><g id='g'><text x='300' y='-868'>left thumb edge</text><text x='500' y='-700'>position</text><path d='M800-100V100h200V-100'/><path d='M800-600V400M900-550q-150 50 0 100M850-500q600 0 200-250'/></g><use xlink:href='#g' x='-1800'/><path d='M-1000-300h1800'/><path d='M1000 300h160M640 300h160'/><path d='M-1000 600h2000'/><text x='-226' y='-340'>1-k</text><text x='-42' y='720'>1</text><text x='858' y='340'>k</text></svg>
            
          
!

CSS

            
              body {
	display: flex;
	flex-direction: column;
	margin: 0;
	height: 100vh;
}
            
          
!

JS

            
              
            
          
!
999px

Console