Pen Settings

HTML

CSS

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

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

              
                .panel
	h2 LOGIN
	.formset
		.form-group
			lable.form-label User Name
			input.form-control(type='text')
		.form-group
			lable.form-label Password
			input.form-control(type='password')
		button.btn Log in
		a(href='#') Forgot Your Password?
	form.register-form
		i.close ×
		h2 REGISTER
		.formset
			.form-group
				lable.form-label User Name
				input.form-control(type='text')
			.form-group
				lable.form-label Email
				input.form-control(type='text')
			.form-group
				lable.form-label Password
				input.form-control(type='password')
			.form-group
				lable.form-label Repeat Password
				input.form-control(type='password')
			button.btn Log in

              
            
!

CSS

              
                @import "compass/css3";
@import url(https://fonts.googleapis.com/css?family=Vibur);
*, *:after, *:before{
  @include box-sizing(border-box);
  @include transition(.3s);
}

$prime :#ED2553;

body{
  background:#2F3E9E;
  font-family: arial;
}

.panel{
  max-width:360px;
  background: #fff;
  @include box-shadow( 0 -8px  0 -2px rgba(255,255,255, 0.7), 0 2px  5px  rgba(0,0,0, 0.15) );
  @include border-radius(8px);
  color: #666;
  margin:auto;
  text-align: center;
  position: absolute;
  left: 0;
  right: 0;
  top:0;
  bottom: 0; 
  height:450px;
  h2{
    margin: 25px 0 45px;
    display: inline-block;
    text-align: left;
    border-left: 3px solid ;
    padding-left: 35px;
    width: 100%;
    font-weight: 200;
    color: $prime;
  }
  a{
    text-decoration: none;
    color: #999;
    display: inline-block;
     margin-top: 35px;
    &:hover{
      color:$prime;
      text-decoration: underline;
    }
  }
}

.btn{
  border:1px solid #ccc;
  padding:12px 8px;
  width: 100%;
  margin-top: 15px;
  background: #fff;
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  color: #bbb;
  margin-bottom: 15px;
  position: relative;
   @include border-radius(4px);
  &:hover{
    color: #fff;
    border-color: #fff;
    @include box-shadow(0 -100px 0 0 $prime inset);
  }
}

.register-form{
  color: #fff;
  background: $prime;
  font-weight: 100;
  width: 72px;
  height: 72px;
  margin:5px ;
  padding:0;
  @include border-radius(100%);
  overflow: hidden;
  display: inline-block;
  cursor: pointer;
  left:320px;
  top: 30px;
 position: absolute;
  @include transition(.3s);
  .close{
    @include transition(.3s);
    position: absolute;
    top: 8px;
    width: 50px;
    height: 50px;
    z-index: 2;
    right:10px;
    font-size: 50px;
    @include rotate(45deg);
  }
  .formset, h2{
    color: #fff;
    opacity: 0;
    position: relative;
    @include translateX(30px);
  }
  h2{
    margin-bottom: 15px;
   @include translateY(30px); 
  }
  .btn{
    color: $prime;
    border-color:#fff;
    &:hover{
      color: #fff;
    }
  }
  .form-group{
    .form-label, .form-control {
          color:#fff;
        }
     &.focus{
        &:after{
          background:#fff;
        }
      }
      &.focus, &.filled {
        .form-label{
          color:#fff;
        }
      }
  }
  
  &.open{
    width: 100%;
    height: 100%;
    position: absolute;
    margin: 0;
    cursor: inherit;
    z-index: 50;
    left: 0;
    top: 0;
    @include border-radius(8px);
    @include transition( width .2s .2S , height .15s .25s, border-radius .6s, left .3s, top .3s);
    .close{
      top: 5px;
      right: 0px;
      font-size: 32px;
      opacity: .7;
      cursor: pointer;
      z-index: 2;
      @include rotate(0deg);
      &:hover{
        opacity: 1;
      }
    }
    .caption{
        font-size: 50px;
        margin: 50px auto 15px;
    }
    .formset, h2{
      opacity: 1;
      @include translateY(0);
       @include transition( transform .5s .55s, opacity 1s .55s);
    }
  }
}
.formset{
  padding: 25px;
  max-width: 320px;
  margin: auto;
}

.form-group{
  border-bottom: 1px solid #ddd;
  position: relative;
  margin-bottom: 25px;
  &:after{
    content:'';
    position: absolute;
    height:2px;
    background: $prime;
    width:0px;
    left: 0;
    right:0;
    margin:auto;
    bottom:-2px;
    opacity: 0;
    @include transition(.3s);
  }
  .form-control{
    border: none;
    height: 35px;
    position: relative;
    z-index: 2;
    padding: 5px;
    background:none;
    color:$prime;
    width: 100%;
    &:focus, &:active{
      @include box-shadow(none);
      outline: none;
    }
  }
  .form-label{
    font-weight: 300;
    color: #bbb;
    font-size: 14px;
    min-height: 17px;
    text-align: left;
    position: absolute;
    top: 10px;
    left: 5px;
    right: 0;
    @include transition(.3s);
    z-index: 1;
  }
  //focus
  &.focus{
    &:after{
      opacity:1;
      width:100%;
      background: $prime;
    }
  }
  &.focus, &.filled {
    .form-label{
      top:-7px;
      font-size: 10px;
      color: $prime;
    }
  }
}
              
            
!

JS

              
                    ////////////____Input Focus___//////////////////

    $('.form-control').focusout(function() {
        $('.form-group').removeClass('focus');
    });
    $('.form-control').focus(function() {
        $(this).closest('.form-group').addClass('focus');
    });

    /// Input Kepress Filled  Focus
    $('.form-control').keyup(function() {
        if($(this).val().length > 0){
            $(this).closest('.form-group').addClass('filled');
        }

        else{
            $(this).closest('.form-group').removeClass('filled');
        }
    });

    /// Input Check Filled Focus
    var $formControl = $('.form-control');
    var values = {};
    var validate =    $formControl.each(function() {
        if($(this).val().length > 0){
            $(this).closest('.form-group').addClass('filled');
        }
        else{
            $(this).closest('.form-group').removeClass('filled');
        }
    });

// Button switching

$('.close').click(function(){
  $(this).closest('.register-form').toggleClass('open');
});
              
            
!
999px

Console