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.


                - const GRID_SIZE = 10
- const COUNT = Math.pow(GRID_SIZE, 2)
  - for(let f = 0; f < COUNT; f++)
    - const x = f % GRID_SIZE  
    - const y = Math.floor(f / GRID_SIZE)
    .flippy-snap__card.flippy-card(style=`--x: ${x}; --y: ${y};`)


  box-sizing border-box
  background hsl(280, 20%, 65%)
  display grid
  place-items center
  min-height 100vh
  --count 0
  height 50vmin
  width 50vmin
  display grid
  grid-gap 1px
  grid-template-columns repeat(var(--grid-size, 10), 1fr)
  grid-template-rows repeat(var(--grid-size, 10), 1fr)
  perspective 50vmin
  transform-style preserve-3d
  --current-image url(
  --next-image url(
  height 100%
  width 100%
  position relative
  transform rotateX(calc(var(--count) * -180deg))
  transition transform 0.25s
  transform-style preserve-3d

    position absolute
    height 100%
    width 100%
    backface-visibility hidden
    -webkit-backface-visibility hidden
    background-image var(--current-image)
    background-position calc(var(--x, 0) * -100%) calc(var(--y, 0) * -100%)
    background-size calc(var(--grid-size, 10) * 100%)

    background-image var(--next-image)
    transform rotateY(180deg) rotate(180deg)


                import { GUI } from ''

const SNAP = document.querySelector('.flippy-snap')

const CONFIG = {
  count: 0

const UPDATE = () => {
  for (const key of Object.keys(CONFIG))`--${key}`, CONFIG[key])

const CONTROLLER = new GUI()
CONTROLLER.add(CONFIG, 'count', -10, 10, 0.1).onChange(UPDATE).name('Count')