Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ add another resource

JavaScript

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

Packages

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.

Behavior

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

              
                mixin top()
  tr.table__top
    th
    th (ใƒŽเฒ ็›Šเฒ )ใƒŽๅฝกโ”ปโ”โ”ป
    th
    th
    th
    th
mixin leg()
  tr.table__leg
    td
    td
    td
    td
    td
input(type='checkbox')
table.table
  tbody
    +top()
  - for (let i = 0; i < 4; i++)
    +leg()
              
            
!

CSS

              
                *
*:before
*:after
  box-sizing border-box

$imageId = 'https://source.unsplash.com/xVKEZ9wVIYM/300x300'
body
  background-color #86e2d5
  min-height 100vh
  overflow hidden

input
  cursor pointer
  opacity 0
  height 50vh
  width 50vw
  position fixed
  transform translate3d(-50%, -50%, 0)
  top 50%
  left 50%
  z-index 10

  &:checked ~ table
    transition transform .25s cubic-bezier(.76,.18,.95,.03)
    transform translate(-50%, -50%) rotateX(-30deg) rotateY(40deg) translate3d(0, 0, -100px) rotateX(90deg)

td
th
  background-color #4c2e10
  background-image 'url(%s)' % $imageId
  background-size cover

// Add a little darkness to some sides
td:nth-of-type(3)
th:nth-of-type(6)
  filter brightness(0.25)
th:nth-of-type(2)
  filter brightness(0.5)

$height = 200px
$width = 300px
.table
  position absolute
  transform-style preserve-3d
  transform-origin bottom
  transition transform .25s ease
  transform translate(-50%, -50%) rotateX(-30deg) rotateY(40deg) translate3d(0, 0, -100px)
  top 50%
  left 50%
  height $height
  width $width
  display block

  *
    transform-style preserve-3d
    position absolute
    display block

  tbody
    height 100%
    width 100%

  &__top
    height $height
    width $width
    top 75px
    transform rotateX(90deg) translate3d(0, 0, 0)
    transform-origin top center

    th:nth-of-type(1)
    th:nth-of-type(2)
      height 100%
      width 100%

    th:nth-of-type(2)
      align-items center
      color #ffc99b
      display flex
      font-size 1.5rem
      justify-content center
      text-shadow 2px 2px black
      transform translate3d(0, 0, -25px) rotateX(180deg)

    th:nth-of-type(3)
    th:nth-of-type(5)
      height 25px
      width 100%

    th:nth-of-type(4)
    th:nth-of-type(6)
      height 100%
      width 25px

    th:nth-of-type(3)
      transform-origin top
      transform rotateX(-90deg)

    th:nth-of-type(4)
      transform-origin right
      transform rotateY(-90deg)
      right 0

    th:nth-of-type(5)
      transform-origin bottom
      bottom 0
      transform rotateX(90deg)

    th:nth-of-type(6)
      transform-origin left
      left 0
      transform rotateY(90deg)


  &__leg
    height ($height / 2)
    width 25px
    bottom 0px

    &:nth-of-type(1)
    &:nth-of-type(3)
      transform translate3d(0, 0, $height)

    &:nth-of-type(2)
    &:nth-of-type(4)
      transform translate3d(0, 0, 25px)

    &:nth-of-type(3)
    &:nth-of-type(4)
      left 275px

    td
      height 100%
      width 100%

    td:nth-of-type(2)
      transform translate3d(0, 0, -25px)

    td:nth-of-type(3)
      transform-origin left
      transform rotateY(90deg)

    td:nth-of-type(4)
      transform-origin right
      transform rotateY(-90deg)

    td:nth-of-type(5)
      height 25px
      width 25px
      bottom 0
      transform-origin bottom
      transform rotateX(90deg)
              
            
!

JS

              
                // NOT FOUND
// (ใƒŽเฒ ็›Šเฒ )ใƒŽๅฝกโ”ปโ”โ”ป
              
            
!
999px

Console