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.

              <div class="optin-container">
	<div class="cta">Sign Up for my Newsletter</div>

	<form class="form hidden">
		<input type="email" id="email" name="email" placeholder="johndoe@gmail.com" />
		<input type="submit" value="Submit" />
</div><!--end .container-->
              @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,300)

// Colors
$gray: #EEEEEE
$orange: #FF9966
$red: #E52B50
$darkred: #9C2542
$text: #212121

	box-sizing: border-box

	background: $gray
	color: $text
		family: 'Source Sans Pro'
		size: 16px
	padding: 4rem 2rem 2rem

	display: flex
	justify-content: center
	flex-flow: row wrap

	box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22)
	width: 30rem
	background: $red
	color: white
	cursor: pointer
	display: block
	font-size: 2rem
	line-height: 1
	padding: 1.75rem 1rem
	text-align: center
	text-decoration: none
	width: 100%

	@media screen and (max-width: 600px)
		line-height: 1.4
		padding: 1.25rem 1rem

	background: $darkred
	display: flex
	flex-flow: row nowrap
	padding: 1rem
	maring: 0
		padding: .75rem
		margin: 0
			border: none
			font-size: 1rem
			flex: 1
			outline: $red 
				outline: .25rem solid $red
			background: linear-gradient(lighten($red, 5%), lighten($red, 0%))
			cursor: pointer
			color: white
			border: none
			font-size: 1rem
			margin: 0 0 0 1rem
			padding: 0 3rem
			transition: all .25s ease-in-out
				background: linear-gradient(lighten($red, 6%), lighten($red, 1%))

	@media screen and (max-width: 600px)
		flex-flow: row wrap
			padding: 1rem !important
			margin: 0 !important
			flex: 100%
				margin-top: 1rem !important
	display: none
              $( document ).ready(function() {
    $(".cta").click(function() {
		 // if form is visible
		 if ($("form").is(":visible")) {
			 // change .cta cursor to default
			 $(".cta").css('cursor', 'default');
🕑 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.