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


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


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 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.


  - (1..64).each do |i|
      - (1..6).each do |j|


                @import compass

$m: 8
$side: 2em
$factor: 20
$faces: 6

  height: 100%
  perspective: $factor*$side
  background: black

  position: absolute
  top: 50%
  left: 50%
  margin: -$m*$side/2
  padding: 0
  width: $m*$side
  transform-style: preserve-3d
  transform: rotateX(60deg) rotateZ(45deg)
  list-style: none

  float: left
  position: relative
  width: $side
  height: $side
  transform-style: preserve-3d
  transition: transform 1.5s ease-in
  cursor: pointer
    transform: translateZ(.95*$side)
    transition: transform .5s ease-out
    position: absolute
    width: inherit
    height: inherit
    box-shadow: 0 0 0 1px black
    @for $k from 1 to 7
        @if $k < 5
          transform: rotateY(#{($k - 1)*90}deg)  translateZ($side/2)
          transform: rotateX(#{($k - 5)*180 - 90}deg) translateZ($side/2)
  @for $i from 1 to 9
    @for $j from 1 to 9
      &:nth-child(#{($i - 1)*$m + $m - $j + 1}) .face
        background: rgb(0, ($i + $j - 2)*255/(2*$m), 255 - ($i + $j - 2)*255/$m/2)


No JS here, just a comment. Simply hover the cubes. :)

Works in browsers that support 3D transforms and nesting 3D transformed elements - see