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.

            
              .pen
	.pen__title
		h1 Penguin
		a(href='https://ivan.odintsov.me', target='_blank')
			img(src='https://maxcdn.icons8.com/Android_L/PNG/24/Messaging/link-24.png', alt='Twitter icon')
		span &nbsp;&nbsp; / &nbsp;&nbsp;
		a(href='https://twitter.com/odintsov_design', target='_blank')
			img(src='https://g.twimg.com/dev/documentation/image/Twitter_logo_blue_32.png', alt='Twitter icon')

	.pen__container
		.pen__artboard
			.penguin
				.penguin__body
				.penguin__eye
				.penguin__beak
				.penguin__paw

	.pen__credits
		| Created with 
		span.pen__love
		|  by 
		a(href='https://codepen.io/ivanodintsov', target='__blank') Ivan Odintsov
		|  &nbsp;&nbsp;&middot;&nbsp;&nbsp;	Original by 
		a(href='https://dribbble.com/shots/141661-penguin', target='__blank') eva galesloot

            
          
!
            
              //Colors
$white: #FAFCF6
$black: #1C1B17
$yellow: #F3D956
$orange-1: #E4AA4D
$orange-2: #DB8F46

.penguin
	position: relative
	height: 160px
	width: 120px

	&__body
		background: linear-gradient(to bottom, $black 0%, $black 50%, $white 50%, $white 100%)
		border-radius: 60px 0
		box-shadow: inset -20px -10px 50px -40px
		height: 100%
		position: relative
		width: 100%
		z-index: 1

		&:before,
		&:after
			background-color: red
			content: ''
			display: block
			height: 50%
			width: 50%
	
		&:before
			box-shadow: inset -20px 10px 50px -40px
			background-color: $white
			border-radius: 60px 0 0 0
			transform: translateX(100%)
	
		&:after
			background-color: $black
			border-radius: 0 0 60px 0

	&__eye
		background-color: $black
		box-shadow: inset 0 0 0 6px $yellow
		border-radius: 26px
		height: 26px
		position: absolute
		right: 0
		margin: 16px 6px
		top: 0
		width: 26px
		z-index: 2

	&__beak
		position: absolute
		right: -30px
		top: 0

		&:before,
		&:after
			content: ''
			display: block

		&:before
			background-color: $orange-1
			border-radius: 0 30px 0 0
			height: 30px
			width: 30px

		&:after
			background-color: $orange-2
			border-radius: 0 0 14px 0
			height: 14px
			width: 14px

	&__paw
		background-color: $orange-1
		border-radius: 0 14px 0 0
		bottom: 0
		height: 14px
		position: absolute
		right: 6px
		width: 50px
		z-index: 0
	
.pen
	&__artboard
		align-items: center
		background-color: #F5F5EA
		display: flex
		justify-content: center

// Template styles
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,600)

a
	font-weight: 600
	color: #91a7ff
	text-decoration: none
	
	&:hover
		color: #5c7cfa
		text-decoration: underline

html,
body
	font-family: 'Open Sans'

body
	align-items: center
	background-color: #f8f9fa
	color: #adb5bd
	display: flex
	justify-content: center
	min-height: 100vh

.pen
	margin: 40px
	
	&__title
		text-align: center

		h1
			font-size: 1.5em
			margin-bottom: 10px
			font-weight: 700

		a
			vertical-align: middle

			&:hover
				img
					animation: link .5s

			img
				width: 18px

	&__credits
		font-size: .8em
		text-align: center

	&__love
		background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/42764/heart-smil.svg)
		display: inline-block
		height: 16px
		vertical-align: middle
		width: 16px

	&__container
		background-color: white
		border-radius: 4px
		box-shadow: 0 1px 3px #dee2e6
		height: 300px
		margin: 40px auto 50px auto
		overflow: hidden
		position: relative
		width: 450px

	&__artboard
		height: 100%
		position: relative
		width: 100%

@keyframes link
	25%
		transform: rotate(10deg)
	50%
		transform: rotate(-10deg)

            
          
!
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