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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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

              
                .search
              
            
!

CSS

              
                @import "nib"

$mainbg = #23252B
$iconc = #B9AC9B

body
  background $mainbg
  overflow hidden

.search
  position absolute
  top 50%
  left 50%
  transform translate(-50%, -50%)
  width 25px
  height 25px
  border-radius 100%
  background $iconc
  cursor pointer
  &:before
  &:after
    content''
    position absolute
    display block
  &:before
    width 19px
    height 19px
    background $mainbg
    border-radius 10px
    margin 3px
    transform rotate(45deg)
    transition all .1s ease
  &:after
    width 3px
    height 9px
    background $iconc
    border-radius 4px
    margin 19px 0 0 21px
    transform rotate(-45deg)
    transition all .2s ease
  &.active
    &:before
      background $mainbg
      width 3px
      height 14px
      margin 6px 0 0 11px
    &:after
      width 3px
      height 14px
      background $mainbg
      margin 6px 0 0 11px
    
              
            
!

JS

              
                $(".search").on 'tap', ->
  $(this).toggleClass 'active'
              
            
!
999px

Console