Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                svg(width='0' height='0' aria-hidden='true')
	filter#alpha(color-interpolation-filters='sRGB')
		feFlood(flood-color='var(--back-c)')
		feComposite(in2='SourceAlpha' operator='in' result='back')
		feColorMatrix(in='SourceGraphic'
									values=`0 0 0 0 0 
													0 0 0 0 0 
													0 0 0 0 0 
													0 1 0 0 0` result='text')
		feFlood(flood-color='var(--text-c)')
		feComposite(in2='text' operator='in')
		feBlend(in2='back')

p: span: span Socks go missing, vases fall,
	br
	| Claws on curtains, they climb the wall.
	br
	| One swift pounce, a sudden bite,
	br
	| Then they purr like all is right.
p: span: span Hiding, waiting, tails held high,
	br
	| Pouncing swift as they fly by.
	br
	| Scratch, attack, then curl up tight,
	br
	| Purring kings of endless night!
              
            
!

CSS

              
                /* relevant code */
body {
	--a: .7;
	
	--back-c-1: rgb(25 25 112/ var(--a));
	--text-c-1: rgb(255 165 0);
	
	--back-c-2: rgb(255 105 180/ var(--a));
	--text-c-2: rgb(25 25 112);
	
	--back-c: var(--back-c-1);
	--text-c: var(--text-c-1)
}

p {
	/* prevent blending with page backdrop */
	isolation: isolate;
	filter: url(#alpha);
	
	&:nth-of-type(2) {
		--back-c: var(--back-c-2);
		--text-c: var(--text-c-2)
	}
}

p > span {
	padding: .5em;
	border-radius: 5px;
	background: #000;
	color: #fff;
	/* Safari unfortunately still needs the prefix */
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	
	/* only on inner span to work in Firefox */
	span { mix-blend-mode: lighten }
}

/* layout, prettifying/ secondary stuff */
html, body { display: grid }

html { min-height: 100% }

body {
	place-content: center;
	background: 
		url(https://images.unsplash.com/photo-1491485880348-85d48a9e5312?w=2070) 
		50%/ cover;
	font: clamp(.75em, 5vmin, 2em)/ 1.25 rokkitt, serif
}

/* functionally the same as a style, 
 * take it out of document flow */
svg[height='0'][aria-hidden='true'] { position: fixed }

p {
	margin: .25em auto;
	padding: .5em;
	max-width: 30em;
	text-align: center
}
              
            
!

JS

              
                
              
            
!
999px

Console