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 directions = ['North', 'North East', 'East', 'South East', 'South', 'South West', 'West', 'North West']
  each direction in directions
      .text(data-word=direction, data-scroll='out', data-splitting='', class=`text--${direction.toLowerCase().replace(' ', '-')}`)= direction


  --speed 1
  --delay 0.5
  --font-size 60

  background #111
  min-height 100vh
  overflow-x hidden

  @media(min-width 768px)
    --font-size 100

  height 100vh
  width 100vw
  scroll-snap-align center
  font-size calc(var(--font-size) * 1px)
  font-weight bold
  display flex
  align-items center
  justify-content center
  font-variant small-caps
  position relative

  --clip 0
  position relative
    --origin 50% 0

    --origin 100% 0

    --origin 100% 50%

    --origin 100% 100%

    --origin 50% 100%

    --origin 0% 100%

    --origin 0% 50%

    --origin 0% 0%

  & > span
    transition -webkit-clip-path calc(var(--speed) * 1s) calc(var(--delay) * 1s) ease, clip-path calc(var(--speed) * 1s) calc(var(--delay) * 1s) ease
    $clip = circle(calc(var(--clip) * 1%) at var(--origin))
    -webkit-clip-path $clip
    clip-path $clip

  &[data-scroll="in"] > span
    --clip 150

    content attr(data-word)
    position absolute
    color rgba(255, 255, 255, 0.15)
    top 0
    left 0
    font-size calc(var(--font-size) * 1px)
    z-index -1

  * Themeing

  height 100vh
  overflow auto
  overflow-x hidden
  // Cant include nice scrolling as it
  // introduces a weird rendering error...   
  // -webkit-overflow-scrolling touch  
  scroll-snap-type y mandatory

  color #fff

.text--north .char:nth-of-type(1)
  color #e6261f

.text--north-east .char:nth-of-type(1)
  color #eb7532

.text--east .char:nth-of-type(1)
  color #f7d038

.text--south-east .char:nth-of-type(1)
  color #a3e048

.text--south .char:nth-of-type(1)
  color #49da9a

.text--south-west .char:nth-of-type(1)
  color #34bbe6

.text--west .char:nth-of-type(1)
  color #4355db

.text--north-west .char:nth-of-type(1)
  color #e6261f
.text--north-west .char:nth-of-type(2)
  color #f7d038
.text--north-west .char:nth-of-type(3)
  color #49da9a
.text--north-west .char:nth-of-type(4)
  color #4355db
.text--north-west .char:nth-of-type(5)
  color #d23be7


                const { Splitting } = window
  scrollingElement: '.container',
  targets: '.text',