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

              
                .container
  .loader
    .loader-1
    .loader-2: .loader-2-container
    .loader-text Loading...
              
            
!

CSS

              
                $size = 80px
.container
  position absolute
  top 0
  left 0
  bottom 0
  right 0
  margin auto
  width $size
  height $size
  
  
.loader
  position relative
  width 100%
  height 100%
  z-index 10
  
  &-text
    position absolute
    top 100%
    padding-top 10px
    text-align center
    width 100%
    
  
  &-1
    width $size
    height @width
    box-sizing: border-box
    background: #000
    border-radius: 50%
    z-index 10
    position relative
    overflow hidden
    animation: loading1 linear 1s infinite
    &:before
      content: ""
      display block
      position absolute
      top 0
      left 0
      right 0
      bottom 0
      margin auto
      z-index 11
      border-radius: inherit
      background #fff
      width round($size * 0.8)
      height @width
    &:after
      content: ""
      position absolute
      display block
      width round($size * 0.5)
      height @width
      top -(round(@width * 0.2))
      left -(round(@width * 0.2))
      background #fff
      z-index 12
      
  &-2
    position absolute
    top 0
    left 0
    bottom 0
    right 0
    margin auto
    background #999
    border-radius: 50%
    width round($size * 0.6)
    height @width
    z-index 20
    overflow hidden
    animation: loading2 linear 1s infinite
    
    &-container
      position relative
      width 100%
      height 100%
      border-radius: 50%
      z-index 21
      &:before
        content: ""
        display block
        position absolute
        top 0
        left 0
        right 0
        bottom 0
        margin auto
        width round($size * 0.4)
        height @width
        background #fff
        border-radius: inherit
        z-index 22
      &:after
        content: ""
        display block
        position absolute
        top -10px
        left -10px
        background #fff
        width round($size * 0.3)
        height @width
        // border-radius: inherit
        top -(round(@width * 0.1))
        left @top
        z-index 23
        
        
@keyframes loading1
  0%
    transform: rotate(0deg)
  100%
    transform: rotate(360deg)
    
@keyframes loading2
  0%
    transform: rotate(360deg)
  100%
    transform: rotate(0deg)
              
            
!

JS

              
                
              
            
!
999px

Console