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.

            
              <section id="loginBox">
	<h2>Login</h2>
	<form method="post" class="minimal">
		<label for="username">
			Username:
			<input type="text" name="username" id="username" placeholder="Username must be between 8 and 20 characters" pattern="^[a-zA-Z][a-zA-Z0-9-_\.]{8,20}$" required="required" />
		</label>
		<label for="password">
			Password:
			<input type="password" name="password" id="password" placeholder="Password must contain 1 uppercase, lowercase and number" pattern="(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$" required="required" />
		</label>
		<button type="submit" class="btn-minimal">Sign in</button>
	</form>
</section>
<center><p>This pen has been created for <a href="http://www.adam-bray.com/blog/">Adam-Bray.com</a>.</p></center>
            
          
!
            
              	* {
		margin: 0;
		padding: 0;
		outline: none;
		
		-webkit-box-sizing: border-box;
  		-moz-box-sizing: border-box;
  		box-sizing: border-box;
	}
	
	body {
		background: #eee;
		color: #444;
		-webkit-font-smoothing: antialiased;
		font-family: "Open Sans", Arial, Helvetica, Geneva, sans-serif;
		font-size: 16px;
		font-weight: 400;
		height: auto !important;
		height: 100%;
		line-height: 1.6em;
		min-height: 100%;
	}
	
	h2 {
		color: rgb(34,34,34);
		font-size: 2.2em;	
		font-weight: 200;
		margin: 0 0 24px 0;
	}
	
	/*BUTTON DESIGN*/
	[class*='btn-'] {
		border: none;
		border-bottom: 2px solid rgba(0,0,0,.15);
		border-top: 1px solid rgba(255,255,255,.15);
		border-radius: 3px;
		color: #fff;
		display: inline-block;
		font: -webkit-small-control;
		font-size: .7em;
		letter-spacing: 1px;
		line-height: 140%;
		padding: 10px 20px;
		text-decoration: none;
		text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
		text-transform: uppercase;
		
		-webkit-transition: all 0.1s linear;
     	-moz-transition: all 0.1s linear;
       	-o-transition: all 0.1s linear;
          transition: all 0.1s linear;
	}
	
		.btn-minimal {
		background-color: rgb(255,255,255);
		border-radius: 0;
		border: 1px solid rgb( 186, 186, 186 );
		color: rgb( 186, 186, 186 );
		text-shadow: 0 1px 1px rgba(255, 255, 255, 1);
	}
	
		.btn-minimal:hover {
			background-color: #4195fc;
			border: 1px solid rgba(0,0,0,.1);
			color: rgb(255,255,255);
			cursor: pointer;
			text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
		}
		
		.btn-minimal:active {
			box-shadow: 0 1px 1px rgba(0,0,0,0.15) inset;
			text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25);
		}
	
	/*SECTION CONTAINER*/
	section#loginBox {
		background-color: rgb(255,255,255);
   border: 1px solid rgba(0,0,0,.15);
		border-radius: 4px;
		box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 0 4px rgba(0,0,0,0.2);
		margin: 40px auto; /*aligns center*/
		padding: 24px;
		width: 500px;
	}
	
	/*FORM*/
	form.minimal label {
		display: block;
		margin: 6px 0;	
	}
	
		form.minimal input[type="text"],
		form.minimal input[type="email"],
		form.minimal input[type="number"],
		form.minimal input[type="search"],
		form.minimal input[type="password"],
		form.minimal textarea {
			background-color: rgb(255,255,255);
			border: 1px solid rgb( 186, 186, 186 );
			border-radius: 2px;
			-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
			-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
			  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
			display: block;
			font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, 'lucida grande', tahoma, verdana, arial, sans-serif;
			font-size: 14px;
			margin: 6px 0 12px 0;
			padding: 8px;	
			text-shadow: 0 1px 1px rgba(255, 255, 255, 1);
			width: 90%;
			
			-webkit-transition: all 0.1s linear;
			-moz-transition: all 0.1s linear;
			-o-transition: all 0.1s linear;
			  transition: all 0.1s linear;
		}
		
		form.minimal input[type="text"]:focus,
		form.minimal input[type="email"]:focus,
		form.minimal input[type="number"]:focus,
		form.minimal input[type="search"]:focus,
		form.minimal input[type="password"]:focus,
		form.minimal textarea:focus,
		form.minimal select:focus { 
   		 	border-color: #4195fc;
    		-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 8px #4195fc;
			-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 8px #4195fc;
			box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 8px #4195fc;
			color: rgb(0,0,0);
		}
		
			form.minimal input[type="text"]:invalid:focus,
			form.minimal input[type="email"]:invalid:focus,
			form.minimal input[type="number"]:invalid:focus,
			form.minimal input[type="search"]:invalid:focus,
			form.minimal input[type="password"]:invalid:focus,
			form.minimal textarea:invalid:focus,
			form.minimal select:invalid:focus { 
				border-color: rgb(248,66,66);
				-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 8px rgb(248,66,66);
				-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 8px rgb(248,66,66);
				  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 8px rgb(248,66,66);
			}

p {
  color: rgba(0,0,0,.8)
  font-size: .8em;
  margin: 0 0 24px 0;
}
            
          
!
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.

Console