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

              
                <section>
	<h3>Dark</h3>
	<p>The highlight of 2018 for me was seeing an <a href='https://www.worldwildlife.org/species/amur-leopard'>Amur leopard</a> from up close for the very first time.</p>
	<img src='https://assets.codepen.io/2017/17_05_a_amur_leopard_32.jpg' alt='fluffy Amur leopard'/>
</section>

<section>
	<h3>Light</h3>
	<p>The highlight of 2018 for me was seeing an <a href='https://www.worldwildlife.org/species/amur-leopard'>Amur leopard</a> from up close for the very first time.</p>
	<img src='https://assets.codepen.io/2017/17_05_a_amur_leopard_32.jpg' alt='fluffy Amur leopard'/>
</section>
              
            
!

CSS

              
                $p: .25em;

* { margin: 0 }

body { display: flex }

section {
	padding: .5em;
	background: #333;
	color: #ddd;
	font: italic clamp(1em, 5vw, 2.5em)/ 1.375 marck script, z003, segoe script, comic sans ms, cursive;
	
	&:nth-child(2) {
		&, & img { filter: invert(1) } /* CSS invert() */
		
		a { color: #{invert(purple)} } /* Sass invert() */
	}
}

a {
	margin: 0 (-1*$p);
  padding: 0 ($p);
	opacity: .999; /* hackaround to fix blending issue ¯\_(ツ)_/¯ */
  --full: linear-gradient(currentColor, currentColor);
  background: 
		var(--full), 
		var(--full) 0 100%/1% var(--sy, 5%) repeat-x;
  -webkit-background-clip: text, border-box;
					background-clip: text, border-box;
  background-blend-mode: difference;
	color: gold;
	-webkit-text-fill-color: transparent;
		 -moz-text-fill-color: transparent;
	box-decoration-break: clone;
  text-decoration: none;
  transition: background-size .25s;
	
	&:focus, &:hover { --sy: 100% }
}

img {
  display: block;
  margin-top: .25em;
  max-width: 100%
}

              
            
!

JS

              
                /*
NO JS here

Created for my Taming Blend Modes: `difference` and `exclusion` (https://css-tricks.com/taming-blend-modes-difference-and-exclusion/) article on CSS-Tricks - check it out for context!
*/
              
            
!
999px

Console