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

              
                <article>
	<h3>
		<a href="#">
			Descriptive headline with decorative call to action prompt
			
			<img class=grow src="https://www.scottohara.me/assets/img/articles/right-arrow.svg" alt>
		</a>
	</h3>
	<p>Some fluffy fluff that describes this stuff.</p>
</article>



<article>
	<h3>
		<a href="#">
			Descriptive headline with decorative call to action prompt and aria-hidden 'read more' text
			
			<span aria-hidden=true>
				<span>Read more</span>
			<img src="https://www.scottohara.me/assets/img/articles/right-arrow.svg" alt>
			</span>
		</a>
	</h3>
	<p>The 'read more' is set to aria-hidden=true so that it won't be included in the heading text by default.</p>
</article>


<article>
	<h3>
		<a href="#">
			My descriptive headline with initially hidden 'read more' text
			
			<span>
				<span class=vh>Read more</span>
			<img src="https://www.scottohara.me/assets/img/articles/right-arrow.svg" alt>
			</span>
		</a>
	</h3>
	<p>This version removes the aria-hidden from the 'read more' text, so it _will_ be read at the end of the heading/link text - BUT, it is set to visibility: hidden when not focused or hovered.  So someone using a screen reader will not initially hear "read more" at the end of the heading text, but if they navigate to the link, the 'read more' call to action will be appended to the end of the text</p>
</article>
              
            
!

CSS

              
                article {
	border: 1px solid #ccc;
	padding: 1em 1em 3em;
	position: relative;
	max-width: 320px;
	margin: 2em;
}

.grow {
	transition: transform .2s ease-in-out;
	transform: scale(1);
}

a img,
a > span {
	position: absolute;
	bottom: .5em;
	right: .5em;
	height: 2em;
	width: 2em;
}

a img {
	background: #fff;
	border-radius: 100%;
	z-index: 2;
}

a > span {
	white-space: nowrap;
	width: auto;
}

a > span span {
		transition: .2s ease-in-out transform, .2s ease-in-out opacity;
	transform: translatex(0em);
	display: block;
	opacity: 0;
}

.vh {
	visibility: hidden;
}

.vh::before {
	content: '– ';
	color: transparent;
}

a[href]:hover > span span,
a[href]:focus > span span {
	transform: translatex(-3em);
	opacity: 1;
	visibility: visible;
}

a[href]:hover .grow,
a[href]:focus .grow {
	transform: scale(1.3)
}
              
            
!

JS

              
                
              
            
!
999px

Console