EvanLovely
8/3/2013 - 12:19 AM

Fancy CSS3 Checkboxes (for Drupal Markup)

Fancy CSS3 Checkboxes (for Drupal Markup)

.form-type-checkbox {
  padding-left: 18px;
  padding-right: 2px;
  position: relative;
  >input {
    position: absolute;
    left: 0;
    top: 4px;
    top: 0\9;
    
    /* Custom WebKit Checkboxes */
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    width: auto\9;
    height: auto\9;
    border: 0;
    background: white;
    background: transparent\9;
    border: solid 1px rgba(63, 151, 206, 0.6);
    -webkit-box-shadow:inset 0 0 4px rgba(0,0,0,0.19);
    -webkit-transition: all .3s linear;
    &:after {
    -webkit-transition: all .3s linear;
      opacity: 0;
      content: '';
      display: block;
      position: absolute;
      top: -6px;
      left: -5px;
      width: 20px;
      height: 16px;
      background-position: 0 0;
      background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAtklEQVQ4y2P4//8/A7Ux1Q0cxoaC ADIbCUgCMTvVXAoE5kA8CYidyXYpGrAH4iVAHIXiCwoMDQTimUBcBsRMlBrKCsTpUANzkC0j11Bu IK6EGlgKsoAkQ4FgChD7AzELVI8YEDdDDawDYk6YQaQY6gg1oAqILYC4D8oHGcyLbBAphoJAKtQg GO4EYiHk2CLHUJAXm6AG9gCxNHoSIMdQEJCFGqiALaGSayjMxQwUGzq0S6nhZygA2ojsbh6J67kA AAAASUVORK5CYII=");
    }
    &:active {
      background: rgba(255, 255, 255, 0.1);
      outline:none;
      &:after {opacity:.3;}
    }
    &:focus {
      outline: none;
    }
    &:checked {
      &:after {opacity: 1;}
      &:active:after {opacity: .3;}
    }
  }
  >label {

  }
}