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

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.

HTML

              
                <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<div class="landing">
<section class="topslot">
	<div class="wrapper">
		
		<div class="brief">
			<h1>slate</h1>
      <p><span id="verb">continue</span> your adventure</p>
		</div>
		
	</div>
</section>

<section>
	<div class="main">
    <form method="POST" action="" accept-charset="UTF-8">
      <input placeholder="username" name="username" type="text" />
      <input placeholder="password" name="password" type="password" value="" />
      <div class="signup-fields">
        <input id="email" placeholder="email" name="email" type="email" value="" />
      </div>
      <input id="submit" type="submit" value="log in" />
    </form>

    <div class="extras">
      <a id="signup" href="#">sign up</a>
    </div>

	</div>
		
</section>
</div>

              
            
!

CSS

              
                @import "compass/css3";

$primaryColour: #27AE60;

@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700);
@import "compass/css3/filter";
@import "compass/css3/transition";

body {
  font-family: "Open Sans";
	  background: $primaryColour;
  height: 100vh;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: none;
}

.topslot {
  background-image: url("https://i.imgur.com/UkKDCJy.jpg");
  background-color: darken($primaryColour,5%);
  background-position: center;
  background-size: cover;
  padding: 1rem 0rem 6rem 0rem;
  box-shadow: 0em -4em 8em -4em rgba(0,0,0,0.5) inset;
  border-bottom: 0.3rem solid darken($primaryColour,10%);
}
.brief {
  display: block;
  color: #fff;
  font-size: 4rem;
  font-weight: 400;
  text-align: center;
  margin: 2rem 0rem 0rem;
  h1 {
    font-size: 5rem;
    margin: 0rem;
  }
  p {
    margin: 0rem;
    font-style: italic;
    font-weight: 300;
    font-size: 1.09rem;
  }
}

form {
  padding: 1rem;
  background: #fff;
  border-radius: 0.25rem;
  box-shadow: 0rem 0.3rem 1rem 0.1rem rgba(0,0,0,0.35);
}

input {
  margin-bottom: 1rem;
  display: block;
  @include box-sizing(border-box);
}

input:not([type=submit]){
  text-align: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.15rem;
  border: 2px solid lighten($primaryColour,5%);
  //@include transition(border 0.5s cubic-bezier(0.605, 1.310, 0.455, 1.005));
  &:focus { border-left-width: 0.5rem; }
  box-shadow: 0rem 0.25rem 0.25rem 0rem rgba(0,0,0,0.15) inset;
  font-size: 1.5rem;
  font-weight: 300;
  width: 100%;
}

input[type=submit] {
  border: 0rem;
  width: 100%;
  background-color: $primaryColour;
  color: white;
  margin-bottom: 0rem;
  font-size: 1.4rem;
  padding: 0.3rem 0rem;
  @include transition(background 0.5s ease);
  &:hover {
    cursor: pointer;
    background-color: lighten($primaryColour,10%);
  }
  &:active {
    -webkit-transition-duration: 0s;
    background-color: darken($primaryColour,5%);
  }
}

#signup.is-on {
  color: #fff;
}
.signup-fields {
  // display: none;
}

.signup-fields {
  height: 0;
  opacity: 0;
  &.is-on {
    opacity: 1;
    height: 60px;
  }
}

.main {
  margin: -2.5rem auto 0rem;
  width: 16rem;
  .extras {
    text-align: center;
    font-size: 0.8rem;
    margin-top: 1rem;
    a {
      text-decoration: none;
      font-weight: 300;
      color: lighten($primaryColour, 25%);
      &:hover {
        color: #fff;
        text-decoration: underline;
      }
    }
  }
}

              
            
!

JS

              
                $('#signup').click(function(){
  if($(this).hasClass("is-on"))
  {
    // $(".signup-fields").slideUp();
    $(this).removeClass('is-on').html("sign up");
    $('.signup-fields').removeClass('is-on');
    $('#submit').attr('value','log in');
    $('#verb').html('continue');
  }
  else
  { 
    // $(".signup-fields").slideDown();
    $(this).addClass('is-on').html("nevermind, log in");
    $('.signup-fields').addClass('is-on');
    $('#submit').attr('value','sign up');
    $('#verb').html('begin');
  }
});

              
            
!
999px

Console