Pen Settings



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


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


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.


Auto Save

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.


                <div class="password-wrapper">
	<input id="password-field" type="password" class="input" name="password">
	<div class="icon-wrapper">
  	<span toggle="#password-field" class="ion ion-eye field-icon toggle-password"></span>

 <div class="strength-lines">
  <div class="line"></div>
  <div class="line"></div>
  <div class="line"></div>


                // helper
	box-sizing: border-box
	font-size: 62.5%

	padding: 0
	margin: 0
	-webkit-font-smoothing: antialiased
	-moz-osx-font-smoothing: grayscale
	box-sizing: inherit
	&::after, &::before
		box-sizing: inherit

// colors
$red: #e74c3c
$orange: #e67e22
$green: #2ecc71
$blue: #3498db
$white: #fff

$dark-blue-light: #34495e
$dark-blue-heavy: #2c3e50

	background-color: transparent !important
	background-color: $red !important
	background-color: $orange !important
	background-color: $green !important

// mixins
	position: absolute
	top: 50%
	left: 50%
	transform: translate(-50%, -50%)

=size($w, $h)
	width: $w
	height: $h

=font-size($sizeValue: 1.6)
	font-size: ($sizeValue * 10) + px
	font-size: $sizeValue + rem

// styles
	background-color: $blue
		@extend %center
		width: 80%
		max-width: 320px
		border-radius: 5px
		background-color: $white
		overflow: hidden
			border: none
			padding: 10px 15px
			font: small-caption	
			width: calc(100% - 50px)
			color: $dark-blue-light
			outline: none
			line-height: 1.5
			position: relative
			display: inline
			float: right
			+size(50px, 50px)
			background-color: $dark-blue-light
			transition: background-color .25s ease-out
			cursor: pointer
				position: absolute
				top: 11px
				right: 12px
				color: #ccc
				transition: color .25s ease-out
				right: 14px
				transition: background-color .25s ease-out
				background-color: $dark-blue-heavy
					color: $blue
					transition: color .25s ease-in

			position: absolute
			bottom: 2px
			left: 0
			right: 0
			+size(calc(100% - 50px), 6px)
			z-index: 3
				position: absolute
				background-color: transparent
				height: 6px
				border-radius: 2px
				transition: background-color 0.25s ease-in
					left: 33%
					right: 33%
					left: 4px
					right: 68%
					left: 68%
					right: 4px


                $(document).ready(function() {
	// hide/show password
	$(".icon-wrapper").click(function() {
		$(".toggle-password").toggleClass(".ion-eye ion-more");
		var input = $($(".toggle-password").attr("toggle"));
		if (input.attr("type") == "password") {
			input.attr("type", "text");
		} else {
			input.attr("type", "password");

	// strength validation on keyup-event
	$("#password-field").on("keyup", function() {
		var val = $(this).val(),
			color = testPasswordStrength(val);

		styleStrengthLine(color, val);

	// check password strength
	function testPasswordStrength(value) {
		var strongRegex = new RegExp(
			mediumRegex = new RegExp(

		if (strongRegex.test(value)) {
			return "green";
		} else if (mediumRegex.test(value)) {
			return "orange";
		} else {
			return "red";

	function styleStrengthLine(color, value) {
			.removeClass("bg-red bg-orange bg-green")
		if (value) {
			if (color === "red") {
			} else if (color === "orange") {
			} else if (color === "green") {