cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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.

            
              // DAILY CSS IMAGES 37 - YODA
// Original illustration by Konrad Kirpluk
// http://www.behance.net/kirpluk

.yoda
	.left
	.right
	.wrinkles
		.top
		.middle
		.bottom
	.head
	.body
		.cape
.original
	| Original illustration by 
	a(href='http://www.behance.net/kirpluk' target='_blank') Konrad Kirpluk
a(href='https://youtu.be/dZiNQJDzIgM' target='blank'): .watchme
		span
			i.fa.fa-youtube-play
		p watch me code this
            
          
!
            
              /* Original illustration by Konrad Kirpluk http://www.behance.net/kirpluk */

/* COLORS */
$bg: #e6e7e9
$green: #b9df00
$d-green: #94ad18
$black: #333
$beige: #ddc6ac
$grey: #ccc


/* 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: $bg

.yoda
	position: relative
	top: 15%
	margin: auto
	@include size(300px,300px)
	&::before
		@include pseudo
		bottom: 39%
		left: 30%
		@include size(3%,40%)
		border-radius: 50%
		background: $grey

/* EARS */	
.left
	position: absolute
	top: 10%
	left: 10%
	border-right: 90px solid $black
	border-top: 30px solid transparent
	border-bottom: 30px solid transparent
	z-index: 0
	&::before
		@include pseudo
		top: -29px
		left: 20px
		border-right: 90px solid $green
		border-top: 30px solid transparent
		border-bottom: 30px solid transparent
	&::after
		@include pseudo
		top: -14px
		left: 53px
		@include size(30px,30px)
		background: $d-green
		border-radius: 40% 0 0 40%
	
.right
	position: absolute
	top: 10%
	right: 10%
	border-left: 90px solid $black
	border-top: 30px solid transparent
	border-bottom: 30px solid transparent
	z-index: 0
	&::before
		@include pseudo
		top: -29px
		right: 20px
		border-left: 90px solid $green
		border-top: 30px solid transparent
		border-bottom: 30px solid transparent

%wrinkles
	@include pseudo
	top: 5px
	background: $black
	border-radius: 6px

%w-before
	left: -25px
	@include size(100%,90%)
	@include cross(transform,rotate(-25deg))
%w-after
	right: -25px
	@include size(100%,90%)
	@include cross(transform,rotate(25deg))

.wrinkles
	position: absolute
	top: 8%
	left: calc((100% - 30px)/2)
	@include size(40px,30px)
	z-index: 3

	.top
		position: absolute
		top: 0
		left: 5%
		@include size(6px,90%)
		background: $black
		border-radius: 6px
		&::before
			@extend %wrinkles
			@extend %w-before
		&::after
			@extend %wrinkles
			@extend %w-after
	
	.middle
		position: absolute
		top: calc((100% - 6px)/2)
		left: calc((100% - 85%)/2)
		@include size(6px,85%)
		background: $black
		border-radius: 6px
		&::before
			@extend %wrinkles
			@extend %w-before
		&::after
			@extend %wrinkles
			@extend %w-after
	
	.bottom
		position: absolute
		bottom: 0
		left: 10%
		@include size(6px,80%)
		background: $black
		border-radius: 6px
		&::before
			@extend %wrinkles
			@extend %w-before
		&::after
			@extend %wrinkles
			@extend %w-after
	
%eyes
	@include pseudo
	bottom: 10%
	@include size(12px,12px)
	background: $black
	border-radius: 50%

.head
	position: absolute
	left: 30%
	@include size(40%,40%)
	background: $green
	border-radius: 50%
	border-top: 10px solid $black
	border-left: 7px solid $black
	border-right: 7px solid $black
	border-bottom: 6px solid $black
	box-shadow: inset 10px 0 0 $d-green
	z-index: 2
	&::before
		@extend %eyes
		left: 20%
	&::after
		@extend %eyes
		right: 20%

%arms
	@include pseudo
	top: 26%
	@include size(33px,33px)
	background: $green
	border: 6px solid $black
	border-radius: 50%
	
.body
	position: absolute
	top: 27%
	left: calc((100% - 40%)/2)
	@include size(33%,40%)
	background: $green
	background-image: linear-gradient(-45deg, $beige 42%, $black 42%, $black 47%, transparent 47%), linear-gradient(45deg, $beige 42%, $black 42%, $black 47%, transparent 47%)
	border: 8px solid $black
	border-radius: 50% 50% 25px 25px
	z-index: 0
	&::before
		@extend %arms
		left: -22px
		box-shadow: inset 5px 0 0 $d-green
	&::after
		@extend %arms
		right: -22px
		box-shadow: inset 5px 0 0 $d-green

.original
	position: absolute
	bottom: 3%
	right: 3%

body, a
	text-decoration: none
	font-family: 'Open Sans', sans-serif
	color: $black

.watchme
	position: absolute
	bottom: 8%
	right: 5%
	text-align: center
	span
		background: #fff
	p
		color: $black
		font-family: 'Open Sans', sans-serif
		margin: 0
	.fa
		vertical-align: middle
		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