Pen Settings



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


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.


Auto Save

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 cards = [
-   {title:"Duis bibendum", body:["Lectus sed iaculis eleifend, nisi nisi facilisis nunc", "A sagittis odio quam sed felis"]},
-   {title:"Nam sagittis", body:["Fusce turpis ligula, placerat ut ultrices vel", "Phasellus sed erat vel sem mollis rutrum"]},
-   {title:"Pellentesque sed", body:["Sed sit amet elit massa. Fusce molestie eleifend velit, a mollis ex dapibus ut. Integer lectus purus, tristique in dapibus sit amet, sagittis luctus erat"]},
-   {title:"Nullam", body:["Donec pellentesque velit magna, nec volutpat sapien aliquam vitae","Proin sed est a turpis porttitor finibus"]},
- ]

  each card in cards
      each className in ['card', 'card ghost']
          h2 #{card.title}
          each paragraph in card.body
            p #{paragraph}


  display grid
  place-items center
  min-height 100vh
  font-family 'Inter', sans-serif
  background #242424
  h2, p
    margin 0
    font inherit
    font-size 1.25rem
    font-weight 500
    --card-shown-x 5rem
    --card-shown-y 3rem
    --card-size-x 12rem
    --card-size-y 8rem
    --card-padding 1rem
    display flex
    flex-direction column
    padding-right calc(var(--card-size-x) - var(--card-shown-x) + 2*var(--card-padding))
    padding-bottom calc(var(--card-size-y) - var(--card-shown-y) + 2*var(--card-padding))
      position relative
      margin-left calc((var(--num) - 1) * var(--card-shown-x))
      width var(--card-shown-x)
      height var(--card-shown-y)
      for num in (1..5)
          --num num
        position absolute
        display flex
        flex-direction column
        gap .5rem
        min-width var(--card-size-x)
        min-height var(--card-size-y)
        padding var(--card-padding)
        border-radius 1rem
        background #2C2C2C
        color white
        box-shadow 0 0 1.5rem -.25rem rgba(0,0,0,0.75)
          z-index 1
          opacity 0
          transition .25s ease
      &:not(:hover) .ghost
        pointer-events none
      &:hover .ghost
        opacity 1


                //Made for MrBanditHat after they asked how to do this