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

              
                <main>
	<h3>Summary</h3>
	<details class="example-1">
		<summary>Summary title</summary>
		Lorem ipsum dolor sit amet consectetur adipisicing elit. Dicta iusto hic beatae quam odit ipsum dolore officiis, molestiae quos. Magnam impedit sit, possimus dolore numquam sapiente? Atque culpa quam ratione!
	</details>

	<h3>Basic div</h3>
	<div class="example-2">Summary div</div>

	<h3>Wrapper summary</h3>
	<details class="example-3">
		<summary><span>Summary wrapped</span></summary>
		Lorem ipsum dolor sit amet consectetur adipisicing elit. Inventore culpa id quos. Voluptatem, animi commodi! Distinctio magnam iusto voluptas eligendi doloremque itaque, consequatur deleniti quidem mollitia ipsum harum neque minus.
	</details>
	
	<h3>Absolute position</h3>
	<details class="example-4">
		<summary>Summary wrapped</summary>
		Lorem ipsum dolor sit amet consectetur adipisicing elit. Inventore culpa id quos. Voluptatem, animi commodi! Distinctio magnam iusto voluptas eligendi doloremque itaque, consequatur deleniti quidem mollitia ipsum harum neque minus.
	</details>
	
<main>
              
            
!

CSS

              
                main {
	width: 60%;
	padding: 1rem;
	margin: 0 auto;
	font-weight: 600;
}

summary::-webkit-details-marker {
  display: none;
}

.example-1 summary,
.example-2,
.example-3 summary span,
.example-4 summary {
	padding: 10px;
	background-color: #d5cdd4;
	
	&::after {
		display: block;
		width: 20px;
		height: 20px;
		margin-left: auto;
		content: " ";
		background-color: #442F4A;
	}
}

.example-1 summary,
.example-2,
.example-3 summary span {
	display: flex;
	align-items: center;
}

.example-4 summary {
	position: relative;
	
	&::after {
		position: absolute;
		top: 10px;
		right: 10px;
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console