css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              .viewport
  - $list = ['Macarons', 'Gummy Bears, Gummy Bears, Gummy Bears, Gummy Bears, Gummy Bears', 'Oreos', 'Laffy Taffy', 'Skittles']
  .todos  
    %h1.title 
      Grocery list
    %i.divider
    %input.toggle#toggle(type='checkbox')
    %label.btn-toggle(for='toggle')
      Toggle
    - $list.each_with_index do |todo, index| 

      %input.input(type='checkbox' id='ch-#{index}' name='ch-#{index}'){:checked => (index == 1 ? "" : nil) }
      %label.item(for='ch-#{index}' style='--item: #{index}')
        .item__content
          .pseudo-check
            .checkmark
              .goo
          %span.item__text
            = todo
      .progress
    .end
      .goo

            
          
!
            
              // Fancy Checkboxes
.input 
  display: none
.pseudo-check
  display: inline-block
  border-radius: .4em
  vertical-align: middle
  position: relative
  transition: all .3s
  box-shadow: inset 0 .05em .15em rgba(0, 0, 0, .3)
  top: -.11em
  +size(1.3em)
.checkmark
  position: relative
  margin: 25% 20%
  clip-path: polygon(0 56%, 35% 87%, 100% 15%, 85% 0, 34% 56%, 15% 39%)
  +size(.75em)
.goo
  border-radius: 50%
  background-color: #fff
  background-color: #39d76e
  position: absolute
  left: 15%
  top: 67%
  opacity: 0
  transition: transform .5s ease-in, opacity .4s .1s
  transform-origin: center
  transform: scale(.1)
  +size(.06em)

.item 
  position: relative
  display: inline-block
  flex-grow: 1
  color: #456
  min-width: 100%
  cursor: pointer
  perspective: 1000px
  margin: 0 -1em
  &__content
    $delay: calc((5 - var(--item)) * .05s)
    transform: rotateX(-90deg)
    background-color: #fff
    transform-origin: top left
    box-sizing: border-box
    padding: 1em 1em
    margin-bottom: -3.5em
    border-top: 1px solid #efefef
    transition: all .5s $delay cubic-bezier(.28,-0.54,.45,2)
    backface-visibility: hidden
    .item:first-of-type &
      border-top: none
  &__text 
    position: relative
    max-width: calc(100% - 1.8em)
    overflow: hidden
    height: 30px
    text-overflow: ellipsis
    display: inline-block
    white-space: nowrap
  &__text::after 
    content: ''
    display: block 
    height: 2px 
    width: 0%
    top: 50%
    left: -2.5%
    position: absolute
    background-color: #39d76e
    transition: all .2s .1s

.progress
  background-color: #39d76e
  width: .01%
  height: 5px
  position: relative
  order: -1
  transition: width .4s
  margin-bottom: 1rem
 
//Styling checked fancy checkboxes
.input:checked 
  & + .item .item__text::after 
    width: 105%
    
  & + .item .pseudo-check
    background: #39d76e
  & + .item + .progress 
    width: 20%
    transition: width .4s .1s
    
  & + .item .goo 
    background-color: #fff
    transform: scale(40)
    opacity: 1
    transition: transform .3s cubic-bezier(1,-0.46,.41,1.34), opacity 0
  & + .item + .stuff 
    float: right


.todos
  width: 95%
  box-sizing: border-box
  max-width: 400px
  display: flex
  flex-wrap: wrap
  padding: 1em 
  position: relative
  padding-bottom: 0.5em
  margin: auto
  border-radius: .1em .1em .3em .3em
  border-top: 20px solid #6836c8
  border-top: 20px solid #04c6df
  background-color: #fff
  box-shadow: 0 30px 40px rgba(0, 0, 0, .4)
  z-index: 2

.divider
  width: 100%
  height: 2px
  order: 0
    
.title 
  order: -4
  width: 100%
  margin-top: 0
  margin-bottom: -5px
  font-size: 1rem
  color: #456
  text-transform: uppercase
  padding-bottom: 1rem 
  border-bottom: 5px solid #d9dee3
  letter-spacing: 0.02em

.toggle
  display: none
  
.toggle:checked
  & ~ .item
    // background-color: #abc
    .item__content
      $delay: calc(var(--item) * .16s)
      margin-bottom: 0em
      transform: rotateX(0deg)
      transition: all .23s $delay cubic-bezier(.28,-0.54,.45,2.1)
  & + .btn-toggle::after 
    top: 35%
    transform: rotateZ(-135deg)

.btn-toggle 
  position: absolute
  top: 1em
  right: 1em
  border: 2px solid #89a
  text-indent: -9999px
  border-radius: 50%
  cursor: pointer
  +size(20px)
  &::after 
    content: ''
    display: block
    border: 2px solid #89a
    border-top: none
    border-left: none
    position: absolute
    top: 16%
    left: 24%
    transition: transform .3s
    transform: rotateZ(45deg)
    +size(8px)

.end 
  display: block
  opacity: 0
  pointer-events: none
  clip-path: polygon(0 56%, 35% 87%, 100% 15%, 85% 0, 34% 56%, 15% 39%)
  +size(8em)
  position: absolute
  top: 230px
  right: calc(50% + 0px)
  transform: translate(50%, -50%)
  z-index: 4
  overflow: hidden
  transition: opacity .1s, all 0 .4s
  .goo 
    background: linear-gradient(#ff3052, #ff51b6)
    transform: scale(1)
    +size(3em)
  
  
.input:checked
  & ~ & ~ & ~ & ~ & ~ .end
    $sp-properties: .2s cubic-bezier(.28,-0.54,.45,1.3) 
    $sp-properties-2: .5s cubic-bezier(.99,-0.4,.14,1.51)
    opacity: 1
    top: 33px
    right: calc(0% + 65px)
    transition: opacity .1s, width .3s $sp-properties, height .3s $sp-properties, top .3s $sp-properties-2, right .3s $sp-properties-2
    +size(1em)
    .goo 
      transition: all .4s
      left: 35%
      top: 17%
      transform: scale(4)
      opacity: 1
  
body
  padding: 0
  margin: 0
  position: relative
.viewport 
  font-family: 'Avenir', sans-serif
  font-size: 1.3em
  display: flex 
  position: absolute
  width: 100vw
  height: 100vh
  max-width: 100vw
  max-height: 100vh
  align-items: center
  overflow: hidden
  background: linear-gradient(to top, #2a037d, #5a3fb9)
  &::after 
    content: ''
    display: block 
    position: absolute
    background: linear-gradient(#fa0, #ff6e12)
    border-radius: 50%
    left: -10%
    bottom: -35vh
    +size(200vw 80vh)

            
          
!
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