cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - 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.

            
              <div class="cntr">
    <label for="cbx" class="label-cbx">
      <input id="cbx" type="checkbox" class="invisible">
      <div class="checkbox">
        <svg width="20px" height="20px" viewBox="0 0 20 20">
          <path d="M3,1 L17,1 L17,1 C18.1045695,1 19,1.8954305 19,3 L19,17 L19,17 C19,18.1045695 18.1045695,19 17,19 L3,19 L3,19 C1.8954305,19 1,18.1045695 1,17 L1,3 L1,3 C1,1.8954305 1.8954305,1 3,1 Z"></path>
          <polyline points="4 11 8 15 16 6"></polyline>
        </svg>
      </div>
      <span>Checkbox</span>
    </label>
  </div>
            
          
!
            
              body
  font-family: Avenir
  font-size: 16px

.label-cbx
  user-select: none
  cursor: pointer
  margin-bottom: 0
  input:checked
    & + .checkbox
      border-color: #20C2E0
      svg
        path
          fill: #20C2E0
        polyline
          stroke-dashoffset: 0
  &:hover
    .checkbox
      svg
        path
          stroke-dashoffset: 0

  .checkbox
    position: relative
    top: 2px
    float: left
    margin-right: 8px
    width: 20px
    height: 20px
    border: 2px solid #C8CCD4
    border-radius: 3px
    svg
      position: absolute
      top: -2px
      left: -2px
      path
        fill: none
        stroke: #20C2E0
        stroke-width: 2
        stroke-linecap: round
        stroke-linejoin: round
        stroke-dasharray: 71px
        stroke-dashoffset: 71px
        transition: all .6s ease
      polyline
        fill: none
        stroke: #FFF
        stroke-width: 2
        stroke-linecap: round
        stroke-linejoin: round
        stroke-dasharray: 18px
        stroke-dashoffset: 18px
        transition: all .3s ease

  > span
    pointer-events: none
    vertical-align: middle

.cntr
  position: absolute
  top: 45%
  left: 0
  width: 100%
  text-align: center

.invisible
  position: absolute
  z-index: -1
  width: 0
  height: 0
  opacity: 0
            
          
!
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