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

              
                .loading-flag--wrapper
  .loading-flag--content
    - var x = 4
    while x > 0
      .loading-flag--flag
        - x--
        - var n = 8
        while n > 0
          .stripe
          - n--
              
            
!

CSS

              
                /* Colors */
uhf-white = #FFFFFF
uhf-red = #A80000
uhf-black = #000000
uhf-blue = #0078D4
ms-green = #81BB07
ms-blue = #00A6F0
ms-red = #F35326
ms-yellow = #FFBA0B

.loading-flag
  &--wrapper
    width 100%
    height 100vh
  &--content
    position absolute
    display flex
    width 204px
    flex-flow wrap
    top 50%
    left 50%
    transform translate(-50%, -50%)
  &--flag
    width 100px
    height 100px
    display inline-block
    margin-bottom 12px
    margin-right 2px
    opacity 0
    animation fade-in .3s ease-in forwards
    &:first-child
      .stripe
        background-color ms-red
    &:nth-child(2)
      .stripe 
        background-color ms-green
    &:nth-child(3)
      .stripe
        background-color ms-blue
    &:nth-child(odd) 
      for num in (1..8)
        .stripe:nth-child({num})
          animation-delay -.1s * num
    &:nth-child(even)
      for num in (1..8)
        .stripe:nth-child({num})
          animation-delay -.8 - .1s * num
    .stripe
      width 8px
      height 100px
      background ms-yellow
      display inline-block
      animation slide .8s ease-in-out infinite alternate

      
@keyframes slide
  to
    transform translateY(20%)

@keyframes fade-in
  to
    opacity 1
              
            
!

JS

              
                
              
            
!
999px

Console