Pen Settings

HTML

CSS

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                div.wrap

  span.arrow
    span
    span

  span.arrow--l-r.right
    span
    span
    span
    span
    span
              
            
!

CSS

              
                // Default document styling
@import 'https://fonts.googleapis.com/css?family=Lato'

html
  height 100%
  font-size 20px
  

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

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

  span
    top .5rem
    position absolute
    width .75rem
    height .1rem
    background-color #efefef
    display inline-block
    transition all .2s ease

    &: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