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.


	<h1>CSS Attribute selectors</h1>
	<p>There is no class on this h1... so why is it green...</p>

<div class="test-one">
	test- if the class by itself

<p class="bla-bla test-two">
	testing if there are many classes and the test- is last

<header class="bla-bla test-butt example">
	testing if there are many classes and the test- is in the middle


		<li class='thing-test'>testing -test</li>
		<li class='test-list-item'>Test list item.</li>


<h3>On another note...</h3>
I DONT WANT ANY ID's used for styling - only JS... so - if an id isn't prefixed with js-, then make this ugly warning to remind people they be wrong.
<div id="test">
	test ID ALERT... Caught you!!! don't style with IDs silly...

<div id="js-test">
	test ID with js- prefix... if you use an ID for JavaScript - then great!, but how can you be sure that some other developer will not style with them?
	'rel' and 'data-x' don't seem like the right place... 



// (anything with the class attribute)
	color: green

// anything with a class containing this string
	color: blue

// select IDs that do not have the js- prefix
[id]:not([id*='js-']) {
	outline: 1px dotted red	!important
	color: red !important
	background: white !important
	padding: .5rem !important
} // I never use outlines anywhere - so this should override anything...