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.

            
              // DAILY CSS IMAGES 45 - MOON
.moon
	.craters
	.eye-left
	.eye-right
.stars
	.top
	.left
	.right
	.bottom

a(href='https://youtu.be/-v0TM3f0t-M' target='blank'): .watchme
		span
			i.fa.fa-youtube-play
		p watch me code this
            
          
!
            
              /* COLORS */
$l-blue: #0B0F2B
$d-blue: #090D23
$black: #333
$l-grey: #EAEAEA
$d-grey: #9E9E9E
$grey: #BFBFBF
$yellow: #EFE894

/* MIXINS */
@mixin pseudo ($position: absolute, $display: block, $content: '')
	position: $position
	display: $display
	content: ''

@mixin size($height, $width)
	height: $height
	width: $width

@mixin cross($property, $val)
	-webkit-#{$property}: $val
	-moz-#{$property}: $val
	-ms-#{$property}: $val
	#{$property}: $val


*
	box-sizing: border-box

body, html
	@include size(100%, 100%)
	background: -webkit-linear-gradient(315deg, $d-blue, $l-blue)

%craters
	@include pseudo
	background: $grey
	box-shadow: inset 2px 0 $d-grey
	border-radius: 50%

.moon
	position: relative
	top: 25%
	margin: auto
	@include size(100px,100px)
	background: $l-grey
	border-radius: 50%
	box-shadow: inset -15px 0 6px $grey, 0 0 8px $l-grey
	animation: floating 5s linear infinite 0s
	z-index: 10

	.craters
		position: absolute
		top: 20%
		left: 20%
		@include size(20%,20%)
		background: $grey
		border-radius: 50%
		box-shadow: inset -1px 0 1px $d-grey
		opacity: 0.4
		&::before
			@extend %craters
			top: -8px
			right: -25px
			@include size(15px,15px)
			box-shadow: inset -1px 0 1px $d-grey
		&::after
			@extend %craters
			top: 30px
			left: 30px
			@include size(10px,10px)
			box-shadow: inset -1px 0 1px $d-grey
		
%eyes
	position: absolute
	bottom: 30%
	@include size(15%,9%)
	background: $black
	border-radius: 50%
	animation: blink 4s linear infinite 0s

%inner-eye
	@include pseudo
	top: 1px
	right: 2px
	@include size(4px,2px)
	background: $l-grey
	border-radius: 50%

.eye-left
	@extend %eyes
	left: 10%
	&::before
		@extend %inner-eye

.eye-right
	@extend %eyes
	bottom: 25%
	left: 30%
	&::before
		@extend %inner-eye
	
%stars
	background: $yellow
	border-radius: 50%
	box-shadow: 0 0 5px 1px $yellow
	animation: glow 5s linear infinite

.stars
	position: absolute
	top: 20%
	left: calc((100% - 300px)/2)
	@include size(200px,300px)

	.top
		position: absolute
		top: 0
		left: 10%
		@include size(3px,3px)
		@extend %stars
		box-shadow: 0 0 5px $yellow
		&::before
			@include pseudo
			top: 10px
			left: 150px
			@extend %stars
			@include size(4px,4px)
		&::after
			@include pseudo
			top: 2px
			left: 90px
			@extend %stars
			@include size(3px,3px)
		
	.left
		position: absolute
		top: 20%
		left: 15%
		@include size(4px,4px)
		@extend %stars
		box-shadow: 0 0 5px $yellow
		&::before
			@include pseudo
			top: 53px
			left: -12px
			@extend %stars
			@include size(3px,3px)
		&::after
			@include pseudo
			top: -10px
			left: 40px
			@extend %stars
			@include size(3px,3px)
		
	.bottom
		position: absolute
		bottom: 20%
		right: 28%
		@include size(3px,3px)
		@extend %stars
		box-shadow: 0 0 5px $yellow
		&::before
			@include pseudo
			@include size(4px,4px)
			@extend %stars
			bottom: 35px
			right: -10px
		&::after
			@include pseudo
			@include size(3px,3px)
			@extend %stars
			top: 10px
			right: 80px
	.right
		position: absolute
		bottom: 25%
		right: 10%
		@include size(5px,5px)
		@extend %stars
	
@keyframes blink
	5%,10%
		height: 1px
	10%
		height: 15%
	
@keyframes floating
	0%
		@include cross(transform, translateY(0px))
	50%
		@include cross(transform, translateY(2px) translateX(1px))
		box-shadow: inset -20px 0 20px $grey, 0 0 8px $l-grey
	100%
		@include cross(transform, translateY(0px))

@keyframes glow
	0%
		opacity: 1
	50%
		opacity: 0.6
	100%
		opacity: 1

.watchme
	position: absolute
	bottom: 5%
	right: 5%
	text-align: center
	span
		background: #fff
	p
		color: #fff
		font-family: 'Open Sans', sans-serif
		margin: 0
	
	.fa
		vertical-align: middle
		width: 40px
		color: #ff0000
		font-size: 3em			
            
          
!
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