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

              
                .container
  form
    .row
      h4 Account
      .input-group.input-group-icon
        input(type="text", placeholder="Full Name")
        .input-icon
          i.fa.fa-user
      .input-group.input-group-icon
        input(type="email", placeholder="Email Adress")
        .input-icon
          i.fa.fa-envelope
      .input-group.input-group-icon
        input(type="password", placeholder="Password")
        .input-icon
          i.fa.fa-key
    .row
      .col-half
        h4 Date of Birth
        .input-group
          .col-third
            input(type="text", placeholder="DD")
          .col-third
            input(type="text", placeholder="MM")
          .col-third
            input(type="text", placeholder="YYYY")
      .col-half
        h4 Gender
        .input-group
          input(type="radio", name="gender", value="male", id="gender-male")
          label(for="gender-male") Male
          input(type="radio", name="gender", value="female", id="gender-female")
          label(for="gender-female") Female
    .row
      h4 Payment Details
      .input-group
        input(type="radio", name="payment-method", value="card", id="payment-method-card", checked="true")
        label(for="payment-method-card")
          span
            i.fa.fa-cc-visa
            | Credit Card
        input(type="radio", name="payment-method", value="paypal", id="payment-method-paypal")
        label(for="payment-method-paypal") 
          span
            i.fa.fa-cc-paypal
            | Paypal
      .input-group.input-group-icon
        input(type="text", placeholder="Card Number")
        .input-icon
          i.fa.fa-credit-card
      .col-half
        .input-group.input-group-icon
          input(type="text", placeholder="Card CVC")
          .input-icon
            i.fa.fa-user
      .col-half
        .input-group
          select
            option 01 Jan
            option 02 Jan
          select
            option 2015
            option 2016
    .row
      h4 Terms and Conditions
      .input-group
        input(type="checkbox", id="terms")
        label(for="terms") I accept the terms and conditions for signing up to this service, and hereby confirm I have read the privacy policy.
              
            
!

CSS

              
                @import "lesshat";

// MIXINS

.clearfix() {
  zoom: 1;
  &:before, &:after{
    content: "";
    display: table;
  }
  &:after{
    clear: both;
  }
}

.col() {
  padding-right: 10px;
  float: left;
  &:last-of-type {
    padding-right: 0;
  }
}

.transition(@speed, @easing) {
  transition: all @speed @easing;  
}

// VARIABLES

@white: #fff;
@grey-lightest: #f9f9f9;
@grey-light: #e3e3e3;
@grey: #e5e5e5;
@grey-dark: #b9b9b9;

@purple: #c68eaa;
@green: #7ed321;
@emerald: #04BDBD;
@blue: #04AEC5;
@blue-dark: #0F6CC9;
@color-primary: @green;
@color-primary-strong: darken(saturate(@color-primary, 5%), 10%);

@br: 3px;

@fast: 0.35s;

@ease: ease-in-out;

// GENERAL

* {
  &, &:before, &:after {
    box-sizing: border-box;
  }
}

body {
  padding: 1em;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 15px;
  // font-size: 1vw;
  color: @grey-dark;
  background-color: @grey-light;
}

// TYPOGRAPHY

h4 {
  color: @color-primary;
}

// FORM

input {
  width: 100%;
  padding: 1em;
  line-height: 1.4;
  background-color: @grey-lightest;
  border: 1px solid @grey;
  border-radius: 3px;
  .transition(@fast, @ease);
  &:focus {
    outline: 0;
    border-color: @color-primary-strong;
    & + .input-icon {
      i {
        color: @color-primary;
      }
      &:after {
        border-right-color: @color-primary;
      }
    }
  }
  &[type="radio"] {
    display: none;
    & + label {
      &:extend(input);
      display: inline-block;
      width: 50%;
      text-align: center;
      float: left;
      border-radius: 0;
      &:first-of-type {
        border-top-left-radius: @br;
        border-bottom-left-radius: @br;
      }
      &:last-of-type {
        border-top-right-radius: @br;
        border-bottom-right-radius: @br;
      }
      i {
        padding-right: 0.4em;
      }
    }
    &:checked + label {
      background-color: @color-primary;
      color: @white;
      border-color: @color-primary-strong;
    }
  }
  &[type="checkbox"] {
    display: none;
    & + label {
      position: relative;
      display: block;
      padding-left: 1.6em;
      &:before {
        &:extend(input);
        position: absolute;
        top: 0.2em;
        left: 0;
        display: block;
        width: 1em;
        height: 1em;
        padding: 0;
        content: "";
      }
      &:after {
        position: absolute;
        top: 0.45em;
        left: 0.2em;
        font-size: 0.8em;
        color: @white;
        opacity: 0;
        font-family: FontAwesome;
        content: "\f00c";
      }
    }
  }
  &:checked + label {
    &:before {
      &:extend(input[type="radio"]:checked + label);
    }
    &:after {
      opacity: 1;
    }
  }
}

select {
  &:extend(input[type="radio"] + label);
  height: 3.4em;
  line-height: 2;
  &:first-of-type {
    border-top-left-radius: @br;
    border-bottom-left-radius: @br;
  }
  &:last-of-type {
    border-top-right-radius: @br;
    border-bottom-right-radius: @br;
  }
  &:focus, &:active {
    outline: 0;
    &:extend(input[type="radio"]:checked + label);
  }
  option {
    &:extend(input);
    background-color: @color-primary;
    color: @white;
  }
}

.input-group {
  margin-bottom: 1em;
  .clearfix();
}

.input-group-icon {
  position: relative;
  input {
    padding-left: 4.4em;
  }
  .input-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 3.4em;
    height: 3.4em;
    line-height: 3.4em;
    text-align: center;
    pointer-events: none;
    &:after {
      position: absolute;
      top: 0.6em;
      bottom: 0.6em;
      left: 3.4em;
      display: block;
      border-right: 1px solid @grey;
      content: "";
      .transition(@fast, @ease);
    }
    i {
      .transition(@fast, @ease);
    }
  }
  
}

// STRUCTURE

.container {
  max-width: 38em;
  padding: 1em 3em 2em 3em;
  margin: 0em auto;
  background-color: @white;
  border-radius: @br * 1.4;
  box-shadow: 0px 3px 10px -2px rgba(0,0,0,0.2);
}

.row {
  .clearfix();
}

.col-half {
  .col();
  width: 100% / 2;
}

.col-third {
  .col();
  width: 100% / 3;
}

@media only screen and (max-width: 540px) {
  .col-half {
    width: 100%;
    padding-right: 0;
  }
}
              
            
!

JS

              
                // INSPIRED BY SEB KAY'S 'SIGN UP FORM'
// https://dribbble.com/shots/1776663-Purple-Sign-Up-Form
// https://dribbble.com/shots/1779149--Free-PSD-Purple-Sign-Up-Form-Payment-Details

// DO YOU HAVE A SPARE DRIBBBLE INVITE? I'D	APPRECIATE IT!
// dribbble.com/josec
              
            
!
999px

Console