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 id="range">
  <span id="currentVal">50</span>
</div>
              
            
!

CSS

              
                body
  min-height 100vh
  font-family 'Poppins', sans-serif
  display flex
  justify-content center
  align-items center
  background #254471

#range
  width 320px
  border 0
  height 6px
  background #667c9c
  outline none
  border-radius 3px
  
  .ui-slider-handle
    position absolute
    margin -4px 0 0 -12px
    border-radius 12px
    background white
    border 0
    height 24px
    width 24px
    outline none
    cursor pointer
    &:hover
    &:focus
      background-color: transparent
      background-image: url("https://i.postimg.cc/8sQ2Z2Px/nyanimated.gif")
      height: 32px
      width: 36px
      background-size: contain
      background-repeat: no-repeat
      background-position: -6px 2px
      border-radius: 0
      
  .ui-slider-range
    background: white
  
  #currentVal
    position absolute
    font-size 16px
    font-weight bold
    color rgba(white,.3)
    width 320px
    text-align center
    margin-top -60px
    
#range:hover .ui-slider-range
  background: linear-gradient(#6F4FF2 0%, #6F4FF2 17%, #5BA9F9 17%, #5BA9F9 34%, #89F84B 34%, #89F84B 50%, #FEFD52 50%,#FEFD52 67%, #EEAC3D 67%, #EEAC3D 83%, #E44229 83%, #E44229 100%)
    
              
            
!

JS

              
                $("#range").slider
  range: "min"
  max: 100
  value: 10
  slide: (e, ui) ->
    $("#currentVal").html ui.value
    return
              
            
!
999px

Console