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

              
                .slider
  .slides
    .slide Slide 1
    .slide Slide 2
    .slide Slide 3

  .controls
    .captions
      .caption This is a caption for slide 1
      .caption This is a caption for slide 2
      .caption This is a caption for slide 3

    .pagination

              
            
!

CSS

              
                $color--white = #FFFFFF
$color--black = #000000
$color--light-grey = #E6E6E6
$color--grey = #CCCCCC
$color--dark-grey = #7B7B7B
$color--primary = #2AA1C0
$color--secondary = #0E647D

*
  box-sizing border-box

html, body
  height 100%

body
  width 100%
  height 100%
  display flex
  flex-wrap wrap
  justify-content center
  align-items center
  background $color--light-grey
  font-family 'Source Sans Pro', sans-serif
  padding 10px
  
.slider
  width 100%
  max-width 700px
  
.slides
  background $color--grey

.slide
  display flex !important
  justify-content center
  align-items center
  background $color--white
  height 350px
  outline 0 !important
  color $color--grey
  font-size 40px

.controls
  display flex
  width 100%
  
.captions
  flex 1
  width 100px
  padding 10px
  margin-top 2px
  color $color--dark-grey
  background $color--white

.caption
  outline 0 !important
  
.pagination
  display flex
  margin-top 2px
  
.pagination__button
  cursor pointer
  display flex
  justify-content center
  align-items center
  color $color--grey
  background $color--white
  width 40px
  height 40px
  margin-left 2px
  
  &:hover
    color $color--white
    background $color--primary
    
  &.slick-disabled
    cursor not-allowed
    background $color--grey
    color $color--white
              
            
!

JS

              
                $(".slides").slick({
  asNavFor: '.captions',
  infinite: false,
  speed: 200,
  arrows: false
})

$(".captions").slick({
  asNavFor: '.slides',
  infinite: false,
  speed: 200,
  fade: true,
  appendArrows: $('.pagination'),
  prevArrow: '<div class="pagination__button"><i class="material-icons">keyboard_arrow_left</i></div>',
  nextArrow: '<div class="pagination__button"><i class="material-icons">keyboard_arrow_right</i></div>'
})
              
            
!
999px

Console