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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <div class="bg-light">
  <div class="container py-5">
  <div class="row justify-content-md-center">
    <div class="col-md-4 mb-3">
       <div class="bg-white p-5 rounded">
         <h6 class="mb-3 font-weight-bold">How are this checkboxes?</h6>
         <div>
           <input type="checkbox" value="" id="check01">
           <label for="check01">
             Pretty
           </label>
        </div>
         <div>
         <input type="checkbox" value="" id="check02">
         <label for="check02">
           Unique
         </label>
        </div>
         <div>
          <input type="checkbox" value="" id="check03">
          <label for="check03">Bouncy</label>
        </div>
         <div>
           <input type="checkbox" value="" id="check04" disabled>
           <label for="check04">Disabled checkbox</label>
          </div>
      </div>
    </div>
    
    <!--  using Bootstrap classes -->
    <div class="col-md-4 mb-3">
      <div class="bg-white p-5 rounded">
        <h6 class="mb-3 font-weight-bold">The perfect project should be</h6>
        <div>
          <input type="radio" value="" id="radio01" name="radioDefault">
          <label for="radio01">Fast</label>
        </div>
        <div>
          <input type="radio" value="" id="radio02" name="radioDefault">
          <label for="radio02">Cheap</label>
        </div>
        <div>
          <input type="radio" value="" id="radio03" name="radioDefault">
          <label for="radio03">Good</label>
        </div>
        <div>
          <input type="radio" value="" id="radio04" name="radioDefault" disabled>
          <label for="radio04">All of them</label>
        </div>
      </div>
        
    </div>
  </div>
</div>
</div>
              
            
!

CSS

              
                // bootstrap variables
@import url('https://fonts.googleapis.com/css?family=Muli:400,700');

$font-family-primary: 'Muli';
$font-family-sans-serif:      $font-family-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

$body-bg:                                 white !default;
$body-color:                              #292929 !default;
$gray-200:                                #CCCCCC !default;
$gray-300:                                #B2B2B2 !default;
$gray-400:                                #9A9A9A !default;
$primary:                                 #E50D52 !default;
$text-muted:                              $gray-400 !default;
$font-size-base:                          1rem !default;
$font-weight-normal:                      400;
$font-weight-bold:                        700;
$line-height-base:                        1.5 !default;

//my variables
$form-check-icon-size:                    20px;
$form-check-input-gutter:                 1rem;
$form-group-margin-bottom:                1.5rem;
$form-check-line-height:                  $line-height-base;
$form-check-label-color:                  rgba($body-color, 0.8);
$form-check-label-hover-color:            rgba($body-color, 1);
$form-check-label-disabled-color:         $text-muted;
$form-check-icon-bg:                      $body-bg;
$form-check-icon-border-color:            $gray-300;
$form-check-icon-checked-border-color:    rgba($primary, .4);
$form-check-icon-disabled-border-color:   $gray-200;
$form-check-icon-checked-color:           $primary;
$form-check-shadow-focus:                 0 6px 7px -1px rgba($primary, 0.1);


// mixins

@mixin transition($transition...) {
  transition: $transition;
}

@mixin animate-keyframe($animation-name) {
    @-webkit-keyframes #{$animation-name} {
        @content;
    }

    @keyframes #{$animation-name} {
        @content;
    }
}

// bounceInCheck animation keyframe

@include animate-keyframe( bounceInCheck ) {
		0% {
			-webkit-transform: scale(0.5);
		}

		50% {
			-webkit-transform: scale(1.05);
		}

		70% {
			-webkit-transform: scale(0.9);
		}

		100% {
			-webkit-transform: scale(1);
		}
}

// inputs style

input[type="checkbox"],
input[type="radio"],
.form-check-input {
  position: absolute;
  opacity: 0;
  width: auto;
}

input[type="checkbox"] + label,
input[type="radio"] + label,
.form-check-label {
  position: relative;
  display: block;
  font-size: $font-size-base;
  line-height: $form-check-line-height;
  min-height: $font-size-base * $form-check-line-height;
  font-weight: $font-weight-normal;
  padding-left: calc(#{$form-check-icon-size} + #{$form-check-input-gutter});
  margin-right: 1rem;
  color:$form-check-label-color;
  @include transition(color .2s ease-out, font-weight .2s ease-out);
  
  &:before,
  &:after {
    content: '';
    display: block;
    position: absolute;
  }
  
  &:before {
    top: calc((#{$form-check-line-height}*#{$font-size-base} - #{$form-check-icon-size})/2);
    left: 0;
    width: $form-check-icon-size;
    height: $form-check-icon-size;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    transform: scale(0.5, 0.5);
    border-width: $form-check-icon-size/2;
    border-style: solid;
    background-color: $form-check-icon-bg;
    border-color: $form-check-icon-border-color;
    @include transition(transform .2s ease-out, border-width .08s ease-out, border-color .2s ease-out, box-shadow .3s ease-in);
  }

  &:after {
    opacity: 0;
  }

  &:empty {
    padding-left: $form-check-icon-size;
  }
}

// only checkbox

input[type="checkbox"] + label {
  &:before {
    border-radius: 4px;
  }
  &:after {
    top: calc((#{$form-check-line-height}*#{$font-size-base} - #{$form-check-icon-size})/2);
    left: 0;
    width: $form-check-icon-size;
    height: $form-check-icon-size;
    background-repeat: no-repeat;
    background-position-x: 0;
    background-position-y: 0;
  }
}

// only radio

input[type="radio"] + label {
  &:before,
  &:after {
    border-radius: 50%;
  }
  &:after {
    top: calc((#{$form-check-line-height}*#{$font-size-base} - 6px)/2);
    left: calc((#{$form-check-icon-size} - 6px)/2);
    width:6px;
    height:6px;
  }
}

// disabled state

input[type="checkbox"]:disabled + label,
input[type="radio"]:disabled + label,
.form-check-input:disabled ~ .form-check-label {
    color: $form-check-label-disabled-color;
    &:before {
      border-color: $form-check-icon-disabled-border-color;
    }
}

// hover

input[type="checkbox"]:not([disabled]) + label,
input[type="radio"]:not([disabled]) + label,
.form-check-input:not([disabled]) ~ .form-check-label {
  &:hover {
    color: $form-check-label-hover-color;
    &:before {
    transform: scale(1, 1);
    border-width: 1px;
  }
  }
}

// checked

input[type="checkbox"]:checked + label,
input[type="radio"]:checked + label {
  font-weight: $font-weight-bold;
  
  &:before {
    transform: scale(1, 1);
    border-width: 1px;
    border-color: $form-check-icon-checked-border-color;
    animation: bounceInCheck .5s forwards;
  }
  
  &:after {
    opacity: 1;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='#{$form-check-icon-size}' height='#{$form-check-icon-size}' viewBox='0 0 32 32'><path fill='#{$form-check-icon-checked-color}' fill-rule='evenodd' d='M21.826054,10.4197054 C22.4543095,9.83188211 23.4407558,9.86559854 24.0267195,10.4951978 C24.6114555,11.123478 24.5787456,12.1086228 23.9505411,12.6932873 L13.9518819,22.0253662 C13.6603617,22.2986663 13.2811707,22.444446 12.8892629,22.444446 C12.4816327,22.444446 12.0871877,22.2848677 11.7919503,21.9926428 L8.45535151,18.6560606 C7.84821616,18.0489253 7.84821616,17.063441 8.45535151,16.4563056 C9.06248686,15.8491703 10.0479711,15.8491703 10.6549609,16.4561601 L12.9263996,18.7265467 L21.826054,10.4197054 Z'/></svg>");
    animation: bounceInCheck .2s forwards;
  }
  
  &:before,
  &:after {
    box-shadow: $form-check-shadow-focus;
  }
}
input[type="radio"] + label:after {
  background-color: $form-check-icon-checked-color;
}


// other styles

body {
  font-family: $font-family-sans-serif;
}



              
            
!

JS

              
                
              
            
!
999px

Console