cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

            
              <script type="text/javascript" src="//use.typekit.net/rdv7feq.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>

<h2>Button styles</h2>
<button class="btn-red">subscribe</button>
<button class="btn-blue">log in</button>
<button class="btn-disabled">submit</button>

<br>
<br>
<br>

<h2>Form styles</h2>
<div class="modal">
  <div class="header">
    <div class="header-text">Sign up</div>
  </div>
  <div class="main">
    <div class="top">
      <p>Signing up gives you access to download images and choose from more virtual devices.</p>
      <div class="input-wrap">
        <label for="name">Name</label>
        <input name="name" placeholder="Name" />
      </div>
      <div class="input-wrap">
        <label for="email">Email Address</label>
        <input id="email" name="email" placeholder="Email Address" />
        <small>Please enter a valid email address</small>
      </div>
      <div class="input-wrap">
        <label for="name">Password</label>
        <input name="name" placeholder="Password" />
      </div>
      <button class="btn-disabled" style="float: right;">submit</button>
    </div>
    <div class="bottom">
      <p>Already have an account?</p>
      <button class="btn-blue">log in</button>
    </div>
  </div>
</div>

<aside>
  <h2>Form Styleguide Notes:</h2>
  <p>Input label floats on keyup so user doesn't lose context.</p>
  <p>Example error state example on email (active on blur, not keyup).</p>
  <p>Form modal max-width 460px.</p>
  <p>Submit --> red on valid form</p>
</aside>
     
            
          
!
            
              //Core colors
  $red: #f05244;
  $red-hover: #d34645;
  $blue: #01adb6;
  $blue-hover: #109b9b;
  $black: #222222;

  $darkText: #383b40;

  $light-grey: #eaeaea;
  $btn-disabled: #a1a1a1;

  *{
    box-sizing: border-box;
  }

//Extends for ease only (do mixins in prod)
.proxima-light{
  font-family: 'proxima-nova';
  font-weight: 300;
}
.proxima-regular{
  font-family: 'proxima-nova';
  font-weight: 400;
}
.proxima-semibold{
  font-family: 'proxima-nova';
  font-weight: 600;
}
.proxima-bold{
  font-family: 'proxima-nova';
  font-weight: 700;
}

%small-caps{
  @extend .proxima-bold;
  text-transform: lowercase;
  font-variant: small-caps;
  font-size: 20px;
  letter-spacing: .03em;
}

// Button styles
[class^="btn-"], [class*="btn-"]{
  outline: 0;
  @extend %small-caps;
  color: #fff;
  border: 0px;
  line-height: 38px;
  padding: 0 20px 2px 20px;
  margin: 0px;
  min-width: 100px;
  
  &:hover{
    cursor: pointer;
  }
}

.btn-red{
  background-color: $red;
  &:hover{
     background-color: $red-hover;
  }
}

.btn-blue{
  background-color: $blue;
  &:hover{
     background-color: $blue-hover;
  }
}

.btn-disabled{
  background-color: $btn-disabled;
  &:hover{
    cursor: auto;
  }
}

//form styles

.input-wrap {
  position:relative;
  margin-bottom:30px;
}
input{
  @extend .proxima-light;
  width: 100%;
  outline: 0;
  height: 45px;
  font-size: 18px;
  margin-bottom: 0px;
  padding-left: 10px;
  border: 1px solid #bbbdbf;
  
}
label {
  position:absolute;
  top:-13px;
  left:0;
  @extend .proxima-light;
  font-size:13px;
  transition: all 0.1s linear;
  opacity:0;
  color: $darkText;
  
  &.show {
    top:-15px;
    opacity:1;
  }
}

.modal{
  max-width: 460px;
  float: left;
  
  .header{
    display: block;
    overflow: hidden;
    @extend %small-caps;
    color: #fff;
    padding: 0 20px;
    line-height: 44px;
    font-size: 22px;
    background-color: $blue;
    border-bottom: 1px solid #bbbdbf;
    
  }
  
  .main{
    padding: 20px;
    background-color: $light-grey;
   
    
    p{
      @extend .proxima-light;
      text-align: center;
      margin: 0 0 20px 0;
    }
    
    .top{
      display: block;
      overflow: hidden;
      
      button{
        margin-top: -10px;
      }
    }
    .bottom{
      display: block;
      border-top: 1px solid #bbbdbf;
      text-align: center;
      margin-top: 20px;
      padding-top: 20px;
      
      p{
        margin: 0 0 10px 0;
      }
    }
  }
}

small{
  background-color: #f0a514;
  color: white;
  padding: 7px;
  width: 100%;
  display: block;
  font-family: proxima-nova;
}

h2{
  font-family: proxima-nova;
}
aside{
  float: left;
  margin-left: 20px;
  font-family: proxima-nova;
  display: block;
}
            
          
!
            
              $(function(){
  
  $('input').bind("isValue",function(){
    var label = $(this).prev("label");
    if(this.value !== ""){
      label.addClass('show');
    } else {
      label.removeClass('show');
    }
  }).on('keyup',function(){
    $(this).trigger("isValue");
  }).trigger("isValue");
  
});


            
          
!
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.
Loading ..................

Console