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

            
              label for="radius" Show radius?
input type="checkbox" id="radius"
#vcent
  - for i in 1..60
    div
            
          
!
            
              @import compass

@import "compass/layout"

$divs: 60
$diameter: 60px
$overlap-factor: 2.4  // lower = more overlap
$side: 24px
$columns: 12
$rows: $divs / $columns
$fade: 4s

$yellow: #f1c40f

html
  padding: 24px 36px
  background: #111

label, input
  cursor: pointer
  float: right
  
label
  margin-left: 12px
  font: bold italic 16px sans-serif
  color: #333

#vcent
  +stretch(0)
  height: $diameter * (1 + ($overlap-factor - 1) * $rows) / $overlap-factor
  width: $diameter * (1 + ($overlap-factor - 1) * $columns) / $overlap-factor
  margin: auto
  font-size: 0
  
  div
    $margin-overlap: -$diameter / $overlap-factor
      
    box-sizing: border-box
    position: relative
    display: inline-block
    height: $diameter
    width: $diameter
    margin: 0 $margin-overlap $margin-overlap 0
    +border-radius($diameter / 2)
    
    &:after
      $pos: ($diameter - $side - 2) / 2 // -2px for border
        
      content: ''
      position: absolute
      top: $pos
      left: $pos
      height: $side
      width: $side
      background: black
      +transition(background $fade, z-index 0s 1s)
        
    &:hover
      pointer-events: none
      z-index: -1 // backup incase pointer-events doesn't work
      
      &:after
        background: $yellow
        +transition(background 0s, z-index 0s)
        
\:checked + #vcent div
  border: 1px solid $yellow
  +transition(background $fade)
  
  &:after
    display: none
  
  &:hover
    background-color: $yellow
    +transition(background 0s)
            
          
!
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