Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.


                <div class='box'>
	<svg viewbox='0 0 800 800'>		
		<g class='arrow' transform='translate(320 72) scale(.75) rotate(36)'>
			<path d='M 15,-50 C 15,-50 -49,-13 8,30 M -21,18 C -20,19 2,37 7,34 C 11,31 6,5 6,5'/>
		<text x='360' y='56'>border limit</text>
		<g class='arrow' transform='translate(475 210) scale(.75) rotate(120)'>
			<path d='M 15,-80 C 15,-50 -49,-13 4,29 M -21,18 C -20,19 2,37 7,34 C 11,31 6,5 6,5'/>
		<text x='530' y='256'>padding limit</text>
		<g class='arrow' transform='translate(425 410) scale(.75) rotate(120)'>
			<path d='M -29,-130 C 15,-50 -49,-13 4,29 M -21,18 C -20,19 2,37 7,34 C 11,31 6,5 6,5'/>
		<text x='530' y='445'>content limit</text>


                body {
	color: #eee;
	background: #333

.box {
	position: relative;
	margin: 5em auto;
	border: dashed 2px currentcolor;
	width: 20em; height: 20em;
	background: #e18728;
	font: 500 1.25em/2 consolas, monaco, ubuntu mono, monospace;
	text-indent: .5em;
	svg, &:before, &:after {
		box-sizing: border-box;
		position: absolute;
	&:before {
		top: 10%; left: 10%;
		border: inherit;
		width: 80%; height: 80%;
		background: #be4c39;
		content: 'padding-box'
	&:after {
		top: 20%; left: 20%;
		border: inherit;
		width: 60%; height: 60%;
		background: #9351a6;
		content: 'content-box'
	svg {
		top: -20%; left: 0%;
		width: 160%; height: 160%;

.arrow {
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-width: 4;
	vector-effect: non-scaling-stroke;

text {
	fill: currentcolor;
	font: 600 1.625em z003, segoe script, comic sans ms, cursive;


CSS masks are alpha masks by default meaning that only the alpha component of the mask pixels matters and gives the alpha of the corresponding masked element pixel.

Demo mentioned in my:

* The `background-clip` Property and its Use Cases

* Restricting a (pseudo) element to its parent’s border-box

* CSS-ing Candy Ghost Buttons

articles on CSS-Tricks.