Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

              
                <a class="video-link" href="https://youtu.be/mjpI68ZGD5U" target="_blank">
	<div class="video-info">
		<div class="video-thumbnail" style="background-image: url('https://i.ytimg.com/vi/mjpI68ZGD5U/maxresdefault.jpg');"></div>
		<div class="video-title">Let's Codepen</div>
		<div class="video-meta">#4 CSS Hover Animation - clip: rect()</div>
	</div>
	<div class="video-cta">
		<div class="video-cta-logo">
			<svg class="youtube-logo" enable-background="new 0 0 128 128" height="128px" id="Layer_1" version="1.1" viewBox="0 0 128 128" width="128px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle cx="64" cy="64" fill="#CC191E" r="64"/></g><path d="M103.201,48.004c0,0-0.781-5.513-3.18-7.939c-3.043-3.187-6.453-3.203-8.016-3.389  c-11.191-0.81-27.988-0.81-27.988-0.81h-0.036c0,0-16.795,0-27.988,0.81c-1.564,0.186-4.972,0.201-8.015,3.389  c-2.399,2.426-3.18,7.939-3.18,7.939S24,54.478,24,60.953v6.071c0,6.471,0.799,12.947,0.799,12.947s0.781,5.51,3.18,7.938  c3.044,3.189,7.041,3.088,8.82,3.422c6.401,0.615,27.202,0.805,27.202,0.805s16.81-0.025,28.005-0.834  c1.564-0.188,4.975-0.203,8.016-3.391c2.4-2.43,3.182-7.939,3.182-7.939S104,73.496,104,67.023v-6.071  C104,54.478,103.201,48.004,103.201,48.004 M54.729,75.428l-0.003-24.581l23.637,12.332L54.729,75.428z" fill="#FFFFFF"/></svg>		
		</div>
		<div class="video-cta-text">
			Watch Video
		</div>
	</div>

</a>

              
            
!

CSS

              
                // Variables =============================================================
$font-family: "Open Sans", Helvetica, Arial, sans-serif

// Mixins ================================================================
=absolute($top, $left, $right, $bottom)
	position: absolute
	top: $top
	left: $left
	right: $right
	bottom: $bottom

=translate($x,$y)
	-webkit-transform: translate($x,$y)
	-webkit-transform: translate3d($x,$y,0)
	-ms-transform: translate($x,$y)
	-ms-transform: translate3d($x,$y,0)
	transform: translate($x,$y)
	transform: translate3d($x,$y,0)

// Colors ================================================================
// Boomer Colors
$boom: #330066
$boom-dk: darken($boom, 2%)
$boom-lt: #9966CC

// Font Colors
$font-dark: #333

// Base colors
$grey: #BDC4D0
$background-light: #F3F4F8
$background-dark: #2F3032
$border-light: darken($background-light, 2%)
$border-dark: darken($background-dark, 2%)
$primary-color: #004983

// Base ==================================================================
*:not(i)
	font-family: $font-family

html
	height: 100%
	font-size: 16px

body
	height: 100%
	background: $background-light

.video-link
	position: fixed
	right: 0
	bottom: 20px
	width: 200px
	height: 45px
	text:
		decoration: none
	background: none
	border-top-left-radius: 24px
	border-bottom-left-radius: 24px
	box-shadow: 2px -2px 30px rgba(0,0,0,0.2)
	cursor: pointer

	&:hover
		.video-info
			visibility: visible
			clip: rect(-50px,200px,225px,-50px)
			transition: clip 0.5s cubic-bezier(0.65, 0.05, 0.36, 1)
			opacity: 1

.video-info
	visibility: hidden
	display: flex
	flex:
		direction: column
	+absolute(0,0,0,null)
	height: 225px
	padding-bottom: 25px
	background: white
	box-sizing: border-box
	+translate(0,-200px)
	transition: visibility 0.2s 0.30s, opacity 0.2s 0.30s, clip 0.5s cubic-bezier(0.65, 0.05, 0.36, 1)
	clip: rect(200px,200px,225px,0)
	will-change: clip
	opacity: 0

	&:after
		display: block
		content: ''
		+absolute(0,0,0,0)
		height: 225px
		background: none
		box-shadow: 2px -2px 30px rgba(0,0,0,0.2)

	.video-title
		display: flex
		flex:
			direction: column
			grow: 0
			shrink: 0
			basis: auto
		align-items: flex-start
		justify-content: flex-end
		height: 36px
		padding: 10px 10px 5px
		font:
			size: 13px
			weight: 700
		letter-spacing: 0.5px
		color: #333
		box-sizing: border-box

	.video-thumbnail
		flex:
			grow: 0
			shrink: 0
			basis: auto
		height: 112.5px
		background:
			size: cover
			position: center center
	
	.video-meta
		display: flex
		flex:
			direction: column
			grow: 1
			shrink: 0
			basis: auto	
		align-items: flex-start
		justify-content: flex-start	
		padding: 0px 10px 10px
		font:
			size: 13px
			weight: 400
		text:
			align: left
		letter-spacing: 1px
		color: #333

.video-cta
	display: flex
	position: relative
	align-items: center
	background: white
	border-top-left-radius: 24px
	border-bottom-left-radius: 24px

	.video-cta-logo
		flex:
			grow: 0
			shrink: 0
		height: 45px
	
		.youtube-logo
			width: 45px
			height: 45px

	.video-cta-text
		flex:
			grow: 1
		padding-left: 20px
		font:
			size: 14px
			weight: 700
		text:
			align: left
		letter-spacing: 1px
		color: #333


              
            
!

JS

              
                
              
            
!
999px

Console