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

              
                .half
	p These panes always split the window in the correct direction.
.half
	p
		| Pure CSS, only 4 rules.
		span.social
			| by  
			a[target='_blank' href='https://twitter.com/rileyjshaw'] rileyjshaw
			|.

              
            
!

CSS

              
                // Maximum aspect ratio beforem switching to a vertical split.
$ASPECT_W: 4
$ASPECT_H: 3

// All you need, right here:
body
	display: flex
	flex-wrap: wrap

.half
	flex-basis: $ASPECT_W / ($ASPECT_W + $ASPECT_H) * 100vh
	flex-grow: 1
	// width: 100%

// Good night, and good luck.

















// Doop, de boop boop...





















// Unrelated visual styles:
html, body
	height: 100%
	width: 100%
	margin: 0

.half
	position: relative
	font: 600 32px Poppins, sans-serif
	color: #f6e8ea
	background: #ef626c
	+ .half
		background: #84dcff

p
	position: absolute
	top: 50%
	left: 50%
	transform: translate(-50%, -50%)
	width: 72%
	margin: 0
	text-align: center

.social
	display: block
	max-height: 0
	opacity: 0
	animation: appear 1s 4s forwards

a
	color: #f9eef0

@keyframes appear
	50%
		max-height: 2em
		opacity: 0
	100%
		max-height: 2em
		opacity: 1

              
            
!

JS

              
                
              
            
!
999px

Console