cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

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

            
          
!
            
              // 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
	width: 100%
	flex-basis: $ASPECT_W / ($ASPECT_W + $ASPECT_H) * 100vh
	flex-grow: 1

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

a
	color: #f9eef0

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

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console