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 class="search">
  <input type="search" autocomplete="off" required/>
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="-20 -20 1000 150">
    <path class="path" fill="none" d="M924.4 85.2c-19.5 19.5-50.8 19.7-70.3 0-19.3-19.4-19.3-51 .3-70.6 19.5-19.5 51-19.4 70.6 0 19.3 19.7 19.3 50.8-.5 70.6l35.4 35.3H0"/>
  </svg>
</div>
              
            
!

CSS

              
                $length: 1324
$start: 363

@mixin center($w, $h)
  position: absolute
  width: $w
  height: $h
  top: 0
  left: 0
  right: 0
  bottom: 0
  margin: auto

html, body
  background: rgb(26, 128, 90)

.search
  @include center(300px, 50px)
  overflow: hidden

  svg
    width: 300px
    transform:  translate3d(-125px, 0, 0)
    transition: .5s
    pointer-events: none
   
  input
    position: absolute
    bottom: 0
    left: 0
    width: 100%
    height: 100%
    background: transparent
    border: none
    color: #fff
    font-family: sans-serif
    font-size: 1.5rem
    padding: 10px 55px 10px 10px
    box-sizing: border-box
    cursor: pointer
    
    &::selection
      background: rgba(black, 0.3)
      
    &:valid, &:focus
      cursor: auto
      + svg
        transform: translate3d(0, 0, 0)
    
    &:focus
      cursor: auto
      outline: none
      + svg
        .path
          stroke-dasharray: $length - $start, $start
          stroke-dashoffset: -$start
    
  .path
    stroke-dasharray: $start, $length - $start
    stroke-dashoffset: 0
    stroke: #fff
    stroke-width: 10
    stroke-linejoin: round
    stroke-linecap: round
    transition: .5s
              
            
!

JS

              
                
              
            
!
999px

Console