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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


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.


                img(src="" width="40%" class="preview")

div.stack.orbit(style="-webkit-transform: rotateX(-12deg) rotateY(203deg);")
  - for (var i = 1; i <= 41; ++i)
    div(class="item i"+i)
  <div class="plate"></div>


                @import compass

html, body
  height: 100%
  width: 100%
  background: #000
  display: flex
  justify-content: center
  align-items: center

$slices: "XlY4oI1" "JAkPgJw" "ux30KuP" "OMMQi7I" "l9yEBaB" "vx2k3z5" "jDQ5uo7" "EZlP7Ao" "P1Hp2ad" "Kxik3AW" "VxMyKPD" "5AbInS4" "wtLXklv" "xEcQzaJ" "N2FdE4h" "hKQfsOk" "jtKeIhw" "tS4MogT" "eEKMdR8" "S1fvRLI" "pRK6OlY" "Q7SWzwe" "EIxG1zU" "fMiS3Ft" "82bpuLK" "aSDAhGS" "DStVN4Q" "Q7Dh4rt" "CHotNQa" "MAC4Bv1" "fAsfWKi" "t8GvYLl" "PVmDAMX" "ClUdEeK" "idcwHZu" "3r1RODG" "6d9VgGi" "ppADkWO" "zIxKVXv" "RvT32mC" "JfBsWvH"
  width: 250px
  height: 144px
  font-size: 110%
  position: relative

    height: 700px
    width: 250px
    border-radius: 1em
    border: 1px solid #ccc
    background-color: #81807e
    background-image: url(
    background-size: 940px
    transform: rotateX(90deg) translateZ(214px)
    top: 0
    left: 0
    height: 144px
    width: 250px
    position: absolute
    opacity: 0.8
    //border: 5px solid rgba(200,0,0,0.5)
    //border-radius: 12em 12em 6em 6em

  @for $i from 1 through length($slices)
    $slice: nth($slices, $i)
    $x: $i - 20

  opacity: 0.5
  position: absolute
  top: 5px
  right: 5px
  cursor: move



                function orbit(el) {
    el = el || document.querySelector('.orbit');

    // for rotation values stored in CSS use this method instead
    var getRotateValues = function (el) {
        var vals = { X: 0, Y: 0, Z: 0 };
        var reg = /rotate(.)\((\-?\d+)/gim;
        ((el.getAttribute('style') || "").match(reg) || []).forEach(function (e) {
            vals[e.replace(reg, '$1')] = Number(e.replace(reg, '$2'));
        vals.Y *= -1;
        return vals;

    el.addEventListener('mousedown', function (e) {
        var sx = e.clientX;
        var sy = e.clientY;
        var rot = getRotateValues(el);

        var drag = function (e) {
            var x = e.clientX,
                y = e.clientY;

   = `rotateX(${(rot.X + (sy - y))}deg) rotateY(${((rot.Y + (sx - x)) * -1)}deg)`;

        var end = function () {
            document.removeEventListener('mousemove', drag);
            document.removeEventListener('mouseup', end);

        document.addEventListener('mousemove', drag);
        document.addEventListener('mouseup', end);