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

              
                h1(class="planet__title") Uranus

section(class="planet__col")
 figure(class="planet__figure")
  img(class="planet--image" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/332937/uranus-transparent.png")
  figcaption(class="caption")
   h2(class="caption__title") Photograph
   cite(class="caption__cite") 
    a(href="https://www.nasa.gov/image-feature/voyager-2-image-of-uranus" target="_blank") NASA Voyager 2
    span January 1986
	 
section(class="planet__col")
 figure(class="planet__figure")
  div(class="planet--css")
  figcaption(class="caption")
   h2(class="caption__title") CSS
   cite(class="caption__cite")
    a(href="https://twitter.com/robdimarzo" target="_blank") @robdimarzo
    span May 2018
              
            
!

CSS

              
                $uranus-color: #D0F6F7;

body {
	height: 100vh;
	width: 100vw;
	margin: 0;
	color: $uranus-color;
	font-family: "Jura";
	background-color: #000000;
	display: grid;
	grid-template-columns: 50% 50%;
	grid-template-rows: 200px 1fr;
	justify-content: center;
	align-items: center;
	align-content: center;
}
.planet__title {
	grid-column-end: span 2;
	text-align: center;
	font-weight: 300;
	letter-spacing: 20px;
	font-size: 62px;
	align-self: flex-end;
	text-transform: uppercase;
		background: linear-gradient(to bottom, $uranus-color 45%, #000000 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.planet__col {
	display: flex;
	flex-direction: column;
	padding: 0px 100px;
	height: 100%;
}
.planet__figure {
	width: 100%;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	.planet--image,
	.planet--css{
		width: 300px;
		height: 300px;
	}
}

.planet--css {
	position: relative; 
	border-radius: 100%;
	background-color: $uranus-color;
	box-shadow: 
		inset 0px 0px 0px 1px rgba(0,0,0,1),
		inset 4px -9px 8px 0px rgba(0,0,0,1), 
		inset -5px -10px 50px -4px rgba(0, 0, 0, 0.3), 
		inset 10px -20px 35px -4px rgba(0, 0, 0, 0.4), 

		inset 30px -60px 80px -25px rgba(43, 81, 88, 0.6), 
		inset 30px -100px 138px 0px rgba(43, 81, 88, 0.4);
	transition: all 800ms ease-in-out;
	&:hover {
		box-shadow: none;
	}
}



.caption{
	text-align: center;
	&__title {
		font-weight: 700;
		font-size: 28px;
	}
	&__cite {
		font-style: normal;
		color: rgba(255,255,255,.7);
		font-size: 16px;
		font-weight: 300;
		a {
			color: #ffffff;
			text-decoration: none;
			transition: all 200ms;
			&:hover {
				color: $uranus-color;
			}
		}
		span {
			display: block;
		}
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console