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

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.

HTML

              
                div.wrap

  span.arrow
    span
    span

              
            
!

CSS

              
                
html
  height 100%  

body
  min-height 100%
  font-family Lato
  color white
  background-color white
  display flex
  justify-content center
  align-items center
  
// Arrow

.arrow
  width 4px
  height 1.25rem
  display inline-block
  position relative
  margin 0 1rem

  span
    top .5rem
    position absolute
    width 9px
    height 2px
    background-color black
    display inline-block
    transition all .2s ease
    border-radius 25px

    &:first-of-type
      left 0
      transform rotate(45deg)

    &:last-of-type
      right 0
      transform rotate(-45deg)

  &.active

    span
      &:first-of-type
        transform rotate(-45deg)

      &:last-of-type
        transform rotate(45deg)

        
.arrow--l-r
  width 1.25rem
  height 1.25rem
  display inline-block
  position relative
  margin 0 1rem
  
  &.left
      span:nth-child(4)    
        transform rotate(-45deg)
      
      span:nth-child(5)    
        transform rotate(45deg)
        
  &.right
      span:nth-child(1)    
        transform rotate(-45deg)
      
      span:nth-child(2)    
        transform rotate(45deg)

  span
    position absolute
    height .1rem
    background-color #efefef
    transition transform .2s ease
    
    &:nth-child(1)    
    &:nth-child(2)    
    &:nth-child(4)    
    &:nth-child(5)    
      width .625rem
      top .625rem
    
    &:nth-child(1)    
      right 0 
      transform-origin bottom right 
      
    &:nth-child(2)    
      right 0
      transform-origin top right 
    
    &:nth-child(3)    
      width 1.25rem
      top .625rem
      
    &:nth-child(4)    
      left 0
      transform-origin bottom left
      
    &:nth-child(5)    
      left 0
      transform-origin top left
              
            
!

JS

              
                $('.arrow').on('click', function() {
    $(this).toggleClass('active');
});

$('.arrow--l-r').on('click', function() {
    $(this).toggleClass('left right');
});
              
            
!
999px

Console