cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              - var d = 2000;
- var w = .8*d, h = .1*w;
- var o = .5*w, b = .1*d;
- var m = 1.5*b, q = .7*b;
- var sw = .005*d, fs = .07*d;
- var na = Math.round(.0625*fs);
- var pa = .2*h;

svg(viewBox=[-d, -.75*d, 2*d, 1.5*d].join(' ')
		xmlns='http://www.w3.org/2000/svg')
	path(d=`M${-o}${-o}H${o}V${o}H${-o}z`)
	style
		| * + [d], #p * {
		| 	fill: none;
		| 	stroke: #ccc;
		| 	stroke-width: #{sw}
		| }
		| [x] { fill: #b53; font: #{fs}px comic sans ms, noteworthy, dancing script ot, ubuntu, cursive }
		| style + * + [x] { fill: #aaa }
		| svg > * { fill: #eee }
		| #e ~ [x], [id] * { fill: #333; stroke: none }
		| #p + * { stroke: #b53 }
		| [x] + * { stroke: #95a }
		| [x] + * + [x] { fill: #95a }
		| #s + * + * + * { fill: #f90 }
		| #s + * { fill: url(#p); stroke: none }
		| #s + * + *, #p * { stroke: #f90 }
		| #e ~ * {
		|		marker-start: url(#s);
		|		marker-end: url(#e);
		| 	font: 700 #{fs}px courier new, monospace
		| }
		| #e ~ [d] { stroke: #333 }
	path(d=`M${-(o + m)}${-o}H${o + 2*m}
					M${o}${-(o + 2*m)}V${o + 2*m}
					M${-(o + m)} ${o}H${o + 2*m}
					M${-o}${-(o + 2*m)}V${o + m}
					M${-(o + 2*m)}${h - o}H${o - 2*h}
					M${o - h}${-(o + m)}V${o + 2*m}
					M${-(o + 2*m)} ${o - h}H${o - 2*h}
					M${o - 2*h}${-(o + m)}V${o + m}
					M${o} ${o - h}h${m}
					M${-2*fs}${-(o + 1.25*b)}v${b}
					M${-2*fs - .3*h}${-(o + .8*h)}q${.3*h} ${1.4*h} ${.6*h} 0`)
	text(x=-4*fs y=-(o + m)) wrapper
	pattern#p(width=pa height=pa 
						patternUnits='userSpaceOnUse')
		path(d=`M0 0l${pa} ${pa}`)
	path(d=`M${-o}${h - o}H${o - 2*h}V${o - h}H${-o}z`)
	text(x=-2.5*fs) chart
	path(d=`M${o - h}${-o}h${h}V${o}H${o - h}z
					M${o - .5*h}${h - o}q0${-2*h} ${1.5*h}${-2*h}
					M${o - .8*h}${.5*h - o}q${.3*h} ${1.4*h} ${.6*h} 0`)
	text(x=(o + h + .2*fs) y=-(o + h - .2*fs)) slider
	marker#s(markerWidth=na markerHeight=na 
						viewBox='-8 -4 8 8' orient='auto' refX='-7')
		path(d='M-8 0 0-4V4')
	path(d=`M${o - h} ${o - h}h${h}v${h}h${-h}`)
	path(d=`M${o + .4*fs} ${o + .4*fs}l${.75*h} ${h}
					M${o + .6*fs} ${o + h}q${-(.5*h + .6*fs)}${-1.7*h} ${h - .7*fs} ${.7*fs - h}`)
	text(x=(o + h) y=(o + 2*h)) thumb at
		tspan(dx=-4.5*fs dy=1.2*fs) minimum value
	marker#e(markerWidth=na markerHeight=na 
					 viewBox='0 -4 8 8' orient='auto' refX='7')
		path(d='M8 0 0-4V4')
	path(d=`M${-(o + b)}${-o}v${-q}
					M${-(o + b)}${h + q - o}v${-q}`)
	path(d=`M${-(o + b)} ${o - h}v${-q}
					M${-(o + b)} ${o + q}v${-q}`)
	path(d=`M${-(o + b + m)}${h - o}V${o - h}`)
	path(d=`M${o - 2*h}${-(o + b)}h${-q}
					M${o - h + q}${-(o + b)}h${-q}`)
	path(d=`M${-o}${-(o + b + m)}H${o}`)
	path(d=`M${(o + b)} ${o - h}v${-q}
					M${(o + b)} ${o + q}v${-q}`)
	path(d=`M${(o + b + m)}${-o}V${o}`)
	path(d=`M${o - h} ${(o + m + b)}h${-q}
					M${o + q} ${(o + m + b)}h${-q}`)
	path(d=`M${-o} ${(o + b)}H${o - 2*h}`)
	text(x=-(o + m - .4*fs) y=(h - o - 2*(h - fs))) k
	text(x=-(o + m - .4*fs) y=(o - 2*(h - fs))) k
	text(x=-(o + 2*m + 2.3*fs)) 1-2<tspan dx='#{-.3*fs}'>·k</tspan>
	text(x=(o - 2*h + 1.8*(h - fs)) y=-(o + b - .25*fs)) k
	text(x=-.5*fs y=-(o + b + m + .2*fs)) 1
	text(x=(o + b - .3*fs) y=(o - 2*(h - fs))) k
	text(x=(o + m + b + .2*fs)) 1
	text(x=(o - h + 1.8*(h - fs)) y=(o + b + m + .25*fs)) k
	text(x=-(h + 1.3*fs) y=(o + b + .8*fs)) 1-2<tspan dx='#{-.3*fs}'>·k</tspan>

// minimal SVG
<svg viewBox='-2000 -1500 4000 3000' xmlns='http://www.w3.org/2000/svg'><path d='M-800-800H800V800H-800z'></path><style>*+[d],#p *{fill:none;stroke:#ccc;stroke-width:10}[x]{fill:#b53;font:140px comic sans ms,noteworthy,dancing script ot,ubuntu,cursive}style+*+[x]{fill:#aaa}svg>*{fill:#eee}#e~[x],[id] *{fill:#333;stroke:none}#p+*{stroke:#b53}[x]+*{stroke:#95a}[x]+*+[x]{fill:#95a}#s+*+*+*{fill:#f90}#s+*{fill:url(#p);stroke:none}#s+*+*,#p *{stroke:#f90}#e~*{marker-start:url(#s);marker-end:url(#e);font:700 140px courier new,monospace}#e~[d]{stroke:#333}</style><path d='M-1100-800H1400M800-1400V1400M-1100 800H1400M-800-1400V1100M-1400-640H480M640-1100V1400M-1400 640H480M480-1100V1100M800 640h300M-280-1050v200M-328-928q48 224 96 0'></path><text x='-560' y='-1100'>wrapper</text><pattern id='p' width='32' height='32' patternUnits='userSpaceOnUse'><path d='M0 0l32 32'></path></pattern><path d='M-800-640H480V640H-800z'></path><text x='-350'>chart</text><path d='M640-800h160V800H640zM720-640q0-320 240-320M672-720q48 224 96 0'></path><text x='988' y='-932'>slider</text><marker id='s' markerWidth='9' markerHeight='9' viewBox='-8 -4 8 8' orient='auto' refX='-7'><path d='M-8 0 0-4V4'></path></marker><path d='M640 640h160v160h-160'></path><path d='M856 856l120 160M884 960q-164-272 62-62'></path><text x='960' y='1120'>thumb at<tspan dx='-630' dy='168'>minimum value</tspan></text><marker id='e' markerWidth='9' markerHeight='9' viewBox='0 -4 8 8' orient='auto' refX='7'><path d='M8 0 0-4V4'></path></marker><path d='M-1000-800v-140M-1000-500v-140'></path><path d='M-1000 640v-140M-1000 940v-140'></path><path d='M-1300-640V640'></path><path d='M480-1000h-140M780-1000h-140'></path><path d='M-800-1300H800'></path><path d='M1000 640v-140M1000 940v-140'></path><path d='M1300-800V800'></path><path d='M640 1300h-140M940 1300h-140'></path><path d='M-800 1000H480'></path><text x='-1044' y='-680'>k</text><text x='-1044' y='760'>k</text><text x='-1722'>1-2<tspan dx='-42'>·k</tspan></text><text x='516' y='-965'>k</text><text x='-70' y='-1328'>1</text><text x='958' y='760'>k</text><text x='1328'>1</text><text x='676' y='1335'>k</text><text x='-342' y='1112'>1-2<tspan dx='-42'>·k</tspan></text></svg>
            
          
!
            
              body {
	display: flex;
	flex-direction: column;
	margin: 0;
	height: 100vh;
}
            
          
!
999px
Loading ..................

Console