Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

Save Automatically?

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

              
                <div class="bad-content" hidden="hidden">
	<p>
		<x-l>Deep in my heart there’s a fire burning hard</x-l>
		<x-l>Deep in my heart there’s desire for a start</x-l>
		<x-l>I’m dying in emotion, it’s my world in fantasy</x-l>
		<x-l>I’m living in my, living in my dreams</x-l>
	</p>
	<p>
		<x-l>You’re my heart, you’re my soul…</x-l>
	</p>
	<footer>Written by Steve Benson</footer>
	<button>show anyway</button>
</div>
<div class="bad-content" hidden="hidden">
	<p>
		<x-l>Cheri, cheri lady</x-l>
		<x-l>Going through emotion</x-l>
		<x-l>Love is where you find it</x-l>
		<x-l>Listen to your heart</x-l>
		<x-l>Cheri, cheri lady…</x-l>
	</p>
	<footer>Written by Dieter Bohlen</footer>
	<button>show anyway</button>
</div>
              
            
!

CSS

              
                html
{
	font: 1.25em/1.5 Georgia, serif;
}

body
{
	margin: auto;
	max-width: 30em;
	padding: 1em;
}

.bad-content
{
	margin: 1.5em 0;
}

.js-enabled .bad-content[hidden]
{
	display: block;
	position: relative;
	max-height: 5em;
	overflow: hidden;
}

.js-enabled .bad-content[hidden]::after
{
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: linear-gradient(hsla(0, 100%, 100%, 0.5), hsla(0, 100%, 100%, 1));
}

.bad-content > button
{
	display: none;
	position: absolute;
	top: 1.5em;
	right: 0;
	z-index: 1;
}

.js-enabled .bad-content > button
{
	display: block;
}

.js-enabled .bad-content:not([hidden]) > button
{
	display: none;
}

.bad-content > p:first-child
{
	margin-top: 0;
}

x-l
{
	display: block;
}

footer
{
	font: 0.625em Helvetica, sans-serif;
}
              
            
!

JS

              
                document.documentElement.classList.add('js-enabled');

var showButtons = document.querySelectorAll('[hidden] > button');

for (var i = 0; i < showButtons.length; i++)
{
	showButtons[i].addEventListener('click', function ()
	{
		this.parentNode.removeAttribute('hidden');
	});
}
              
            
!
999px

Console