css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <main>
    <details>
   		<summary role="button" tabindex="0">
    		Consectetur adipiscing elit
    	</summary>
		<div>
    		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi tincidunt fermentum tortor at efficitur. Praesent ultriximus pulvinar, enim metus mollis quam, id posuere nisi mi nec lacus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur <a href="/">i am a link</a>, duis tincidunt rutrum neque, sit amet laoreet risus blandit vitae. Suspendisse vitae elit maximus, vehicula diam vel, laoreet ligula. Aliquam iaculis diam id aulus blandit sem scelerisque facilisis.
    		</p>
    	</div>
	</details>
	<details>
    	<summary role="button" tabindex="0">
			Lorem ipsum dolor sit amet
		</summary>
        <div>
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi tincidunt fermentum tortor at efficitur. Praesent ultricies ipsum eu hendrerit euismod. Morbi tristique, ligula et maximus pulvinar, enim metus mollis quam, id posuere nisi mi nec lacus.</p>
<p> Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis tincidunt rutrum neque, sit amet laoreet risus blandit vitae. Suspendisse vitae elit maximus, vehicula diam vel, laoreet ligula. Aliquam iaculis diam id augue gravid.</p>
        </div>
    </details>
	<details>
    	<summary role="button" tabindex="0">
			Posuere nisi
		</summary>
    	<div>	
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi tincidunt fermentum tortor at efficitur. Praesent ultricies ipsum eu hendrerit euismod. Morbi tristique, ligula et maximus pulvinar, enim metus mollis quam, id posuere nisi mi nec lacus. Orci lerisque eu lorem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras ultricies felis justo, iaculis vehicula massa semper sed.
            </p>
        </div>
    </details>
    <details>
		<summary role="button" tabindex="0">
 			Morbi efficitur ligula
		</summary>
		<div>
           <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi tincidunt fermentum tortor at efficitur.</p>
			<p>Praesent ultricies ipsum eu hendrerit euismod. Morbi tristique, ligula et maximus pulvinar, enim metus mollis quam, id posuere nisi mi ne.
            </p>
        </div>
    </details>
</main>
            
          
!
            
              // Colors
$grey-light: #f0f4f9;
$grey: darken($grey-light, 20%);
$blue: #1e90ff;
$orange: #ff5321;

// Defaults
$box-shadow: 0 15px 35px rgba(50, 50, 93, .1), 0 5px 15px rgba(0, 0, 0, .07);
$border-radius: .3em;

@keyframes expand {
  0%    {opacity: 0; max-height: 0; }
  100%  {opacity: 1; max-height: 30em; }
}

// Basic setup
html {
	overflow-y: scroll;
}

body {
	position: relative;
	background: #f0f4f9;
	line-height: 1.6;
	font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

main {
	display: block; /* IE */
	width: 70%; max-width: 50em;
	margin: 3em auto;
}

p { 
	margin: 0;
}

p + p { 
	margin-top: 1.5em;
}

a { 
	color: $blue;
}

details > div {
	position: relative;
	z-index: 20;
	padding: 1.25em 1.5em;
	margin-bottom: .6em;
	border-radius: $border-radius;
	box-shadow: $box-shadow;
	background-color: white;
	// animation: expand .2s ease-in-out;
}

// Details & Summary
summary {
	position: relative;
	z-index: 10;
	display: block;
	background: white;
	padding-left: 3em;
	margin-bottom: .5em;
	font-size: 1.2em;
	line-height: 3;
	box-sizing: border-box; 
	list-style: none;
	cursor: pointer;
	border-radius: $border-radius;
	box-shadow: $box-shadow;
}

summary:hover,
summary:focus {
	background: $blue;
	color: white;
	text-shadow: 0 -1px 0 rgba(black, .5);
	outline: 0;
}

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

summary::before {
	content: '+';
	position: absolute;
	top: 50%; 
	left: 1em;
	transform: translateY(-50%);
	width: 1em; 
	height: 1em;
	margin-right: 1em;
	background: $orange;
	color: white;
	font-family: Arial, sans-serif;
	font-size: 20px;
	line-height: 1;
	text-align: center;
	border-radius: 50%;	
}

details[open] summary::before {
	content: '-';
	line-height: .9;
}

details[open] summary:hover::before,
details[open] summary:focus::before {
	background: white;
	color: $blue;
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console