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 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

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

              
                <section>
	<div>
		<button class="new">
			<span>New</span>
		</button>
		<button class="modechange">
			<span>Change Mode</span>
		</button>
	</div>
	<div class="controllers">
		<button class="bold">
			<span>Bold</span>
		</button>
		<button class="italic">
			<span>italicBold</span>
		</button>
		<button class="underlined">
			<span>Underlined</span
		</button>
		<button class="title">
			<span>Title</span>
		</button>
		<button class="ul">
			<span>Unordered List</span>
		</button>
		<button class="ol">
			<span>Ordered List</span>
		</button>
		<button class="quote">
			<span>Quote</span>
		</button>
		<button class="photo">
			<span>Photo</span>
		</button>
	</div>
</section>
<main>
	<aside>
		<ul>
			<li>
				<span>INBOX</span>
			</li>
			<li data-time="2 mins ago">
				<span>Article Title</span>
			</li>
			<li class="active" data-time="2 mins ago">
				<span>Article with very long title and…</span>
			</li>
			<li data-time="2 mins ago">
				<span>Article Title</span>
			</li>
			<li data-time="2 mins ago">
				<span>Article Title</span>
			</li>
			<li data-time="2 mins ago">
				<span>Article Title</span>
			</li>
			<li data-time="2 mins ago">
				<span>Article Title</span>
			</li>
			<li data-time="2 mins ago">
				<span>Article Title</span>
			</li>
			<li data-time="2 mins ago">
				<span>Article Title</span>
			</li>
			<li data-time="2 mins ago">
				<span>Article Title</span>
			</li>
		</ul>
	</aside>
	<article contenteditable>
		<h3>Article Title</h3>
		<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Nam cumque doloribus quas accusamus eligendi! Corrupti in cum quos libero iste est velit optio voluptatibus tempore? Totam numquam deleniti iure perspiciatis.</p>
		<ol>
			<li>One</li>
			<li>Two</li>
			<li>Three</li>
		</ol>
		<ul>
			<li>One</li>
			<li>Two</li>
			<li>Three</li>
		</ul>
		<blockquote>
			Nulla dapibus, nisi nec facilisis sagittis, enim tortor rhoncus sapien, vitae pretium sapien magna quis ligula. Proin rhoncus in lorem eu sodales. Nunc vitae sapien nisl. Phasellus sed libero sem.
		</blockquote>
		<div class="img_wrap">
			<img src="http://placekitten.com/g/916/605" alt="">
		</div>
	</article>
</main>
              
            
!

CSS

              
                html, body {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	padding-top: 60px;
}

section {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	display: flex;
	width: 100%;
	height: 60px;
	line-height: 60px;
	border-bottom: 1px solid #DDDFD4;
	background-color: white;
	z-index: 3;
	
	button {
		cursor: pointer;
		width: 24px;
		height: 24px;
		outline: none;
		border-width: 0;
		vertical-align: middle;
		background-size: 24px auto;
		background-position: center;
		margin: 0 8px;
		
		span {
			display: none;
		}
		
		&.new {
			width: auto;
			height: 36px;
			color: white;
			background-color: #173E43;
			border-radius: 5px;
			padding: 9px 22px;
			
			span {
				display: inline;
			}
		}
		
		&.modechange {
			background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48ZGVmcz48c3R5bGU+LmF7ZmlsbDpub25lO30uYntmaWxsOiNkZGRmZDQ7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJhIiBkPSJNMjQsMEgwVjI0SDI0WiIvPjxwYXRoIGNsYXNzPSJiIiBkPSJNMTcuNjYsNy45MywxMiwyLjI3LDYuMzQsNy45M2E4LDgsMCwxLDAsMTEuMzIsMFpNMTIsMTkuNTlBNiw2LDAsMCwxLDcuNzYsOS4zNUwxMiw1LjFaIi8+PC9zdmc+');
		}
		
		&.bold {
			background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48ZGVmcz48c3R5bGU+LmF7ZmlsbDojM2ZiMGFjO30uYntmaWxsOm5vbmU7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJhIiBkPSJNMTUuNiwxMC43OUEzLjY0MSwzLjY0MSwwLDAsMCwxNy4yNSw4YTMuOTQzLDMuOTQzLDAsMCwwLTQtNEg3VjE4aDcuMDRhMy43OTMsMy43OTMsMCwwLDAsMS41Ni03LjIxWk0xMCw2LjVoM2ExLjUsMS41LDAsMCwxLDAsM0gxMFptMy41LDlIMTB2LTNoMy41YTEuNSwxLjUsMCwwLDEsMCwzWiIvPjxwYXRoIGNsYXNzPSJiIiBkPSJNMCwwSDI0VjI0SDBaIi8+PC9zdmc+');
		}
		
		&.italic {
			background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48ZGVmcz48c3R5bGU+LmF7ZmlsbDpub25lO30uYntmaWxsOiNkZGRmZDQ7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJhIiBkPSJNMCwwSDI0VjI0SDBaIi8+PHBhdGggY2xhc3M9ImIiIGQ9Ik0xMCw0VjdoMi4yMUw4Ljc5LDE1SDZ2M2g4VjE1SDExLjc5bDMuNDItOEgxOFY0WiIvPjwvc3ZnPg==');
		}
		
		&.underlined {
			background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48ZGVmcz48c3R5bGU+LmF7ZmlsbDpub25lO30uYntmaWxsOiNkZGRmZDQ7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJhIiBkPSJNMCwwSDI0VjI0SDBaIi8+PHBhdGggY2xhc3M9ImIiIGQ9Ik0xMiwxN2E2LDYsMCwwLDAsNi02VjNIMTUuNXY4YTMuNSwzLjUsMCwwLDEtNywwVjNINnY4QTYsNiwwLDAsMCwxMiwxN1pNNSwxOXYySDE5VjE5WiIvPjwvc3ZnPg==');
		}
		
		&.title {
			background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48ZGVmcz48c3R5bGU+LmF7ZmlsbDojZGRkZmQ0O30uYntmaWxsOm5vbmU7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJhIiBkPSJNNSw0VjdoNS41VjE5aDNWN0gxOVY0WiIvPjxwYXRoIGNsYXNzPSJiIiBkPSJNMCwwSDI0VjI0SDBaIi8+PC9zdmc+');
		}
		
		&.ul {
			background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48ZGVmcz48c3R5bGU+LmF7ZmlsbDojZGRkZmQ0O30uYntmaWxsOm5vbmU7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYX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N0g5bDItNFY3SDV2Nkg4Wm04LDBoM2wyLTRWN0gxM3Y2aDNaIi8+PHBhdGggY2xhc3M9ImIiIGQ9Ik0wLDBIMjRWMjRIMFoiLz48L3N2Zz4=');
		}
		
		&.photo {
			background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48ZGVmcz48c3R5bGU+LmF7ZmlsbDojZGRkZmQ0O30uYntmaWxsOm5vbmU7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJhIiBkPSJNMjEsMTlWNWEyLjAwNiwyLjAwNiwwLDAsMC0yLTJINUEyLjAwNiwyLjAwNiwwLDAsMCwzLDVWMTlhMi4wMDYsMi4wMDYsMCwwLDAsMiwySDE5QTIuMDA2LDIuMDA2LDAsMCwwLDIxLDE5Wk04LjUsMTMuNSwxMSwxNi41MSwxNC41LDEyLDE5LDE4SDVaIi8+PHBhdGggY2xhc3M9ImIiIGQ9Ik0wLDBIMjRWMjRIMFoiLz48L3N2Zz4=');
		}
	}
	
	div {
		flex: 1 1 auto;
		display: flex;
		justify-content: flex-start;
    	align-items: center;
		padding: 12px 8px;
		
		&:first-child {
			flex: 0 0 330px;
			justify-content: space-between;
			padding-right: 0;
			background-color: white;
		}
		
		&:last-child {
			padding-left: 0;
		}
	}
}

main {
	display: flex;
	flex-flow: row nowrap;
	max-height: calc(100vh - 60px);
	overflow: hidden;
	z-index: 2;
}

aside {
	flex: 0 0 330px;
	overflow-y: scroll;
	z-index: 1;
	
	ul {
		width: 100%;
		display: flex;
		flex-flow: column nowrap;
	}
	
	li {
		position: relative;
		padding: 16px 18px 16px 16px;
		min-height: 74px;
		
		&[data-time]::before {
			position: absolute;
			bottom: 16px;
			left: 18px;
			display:block;
			color: #707070;
			content: attr(data-time);
			font-weight: 700;
			font-size: 12px;
			line-height: 14px;
		}
		
		&::after {
			display: inline-block;
			width: 18px;
			height: 18px;
			content: '\200B';
			vertical-align: middle;
			background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4Ij48ZGVmcz48c3R5bGU+LmF7ZmlsbDpyZ2JhKDAsMCwwLDApO308L3N0eWxlPjwvZGVmcz48cGF0aCBkPSJNMTcsNy40M2wtNS4zOTItLjQ2NUw5LjUsMiw3LjM5Miw2Ljk3MiwyLDcuNDNsNC4xLDMuNTQ3TDQuODY1LDE2LjI1bDQuNjM1LTIuOCw0LjYzNSwyLjgtMS4yMjItNS4yNzNaTTkuNSwxMi4wNWwtMi44MiwxLjcuNzUtMy4yMUw0Ljk0LDguMzgyLDguMjI1LDguMSw5LjUsNS4wNzUsMTAuNzgzLDguMWwzLjI4NS4yODUtMi40OSwyLjE2Ljc1LDMuMjFaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMC41IC0wLjUpIi8+PHBhdGggY2xhc3M9ImEiIGQ9Ik0wLDBIMThWMThIMFoiLz48L3N2Zz4=');
		}
		
		span {
			font-size: 18px;
			line-height: 22px;
			font-weight: 700;
			
		}
		
		&.active, 
		&:hover {
			background-color: rgba(#3FB0AC, .2);
		}
		
		&.active {
			&::after {
				background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4Ij48ZGVmcz48c3R5bGU+LmF7ZmlsbDpub25lO30uYntmaWxsOiNmYWU1OTY7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJhIiBkPSJNMCwwSDE4VjE4SDBaIi8+PHBhdGggY2xhc3M9ImIiIGQ9Ik05LjQsMTMuMjU0LDEzLjk3NSwxNmwtMS4yMTQtNS4xODFMMTYuOCw3LjMzNmwtNS4zMjEtLjQ1TDkuNCwyLDcuMzIxLDYuODg2LDIsNy4zMzZsNC4wNDEsMy40ODZMNC44MjcsMTZaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMC40MDEgLTAuNDAxKSIvPjxwYXRoIGNsYXNzPSJhIiBkPSJNMCwwSDE4VjE4SDBaIi8+PC9zdmc+');
			}
		}
		
		&:first-of-type {
			color: #CCCCCC;
			min-height: 38px;
			height: 38px;
			padding: 12px 18px 12px 16px;
			line-height: 38px;
			
			span {
				font-size: 14px;
				line-height: 17px;
				font-weight: 700;
			}
			
			&::after {
				display: inline-block;
			}
		}
		
		&:not(:first-of-type)::after {
			position: absolute;
			top: 18px;
			right: 18px;
		}
	}
}

article {
	flex: 1 1 auto;
	outline: none;
	padding: 40px 60px;
	z-index: 1;
	overflow-y: scroll;
	
	* {
		line-height: 1.5;
	}
	
	h3 {
		font-weight: 700;
		font-size: 40px;
		line-height: 48px;
		letter-spacing: 0;
	}
	
	p {
		font-size: 16px;
		font-weight: 400;
		letter-spacing: 0;
		margin: 9px 0;
	}
	
	ol, ul {
		font-size: 20px;
		line-height: 24px;
		font-weight: 400;
		margin: 9px 0;
		padding: 0 0 0 1em;
	}
	
	ol {
		list-style: decimal;
	}
	
	ul {
		list-style: disc;
	}
	
	blockquote {
		border-left: 5px solid #173E43;
		padding-left: 14px;
	}
	
	.img_wrap {
		margin: 30px 0;
	}
	
	img {
		max-width: 100%;
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console