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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

              
                <div class="tweet">
   <div class="skeleton">
      <div class="skeleton-avatar"></div>
      <div class="tweet-content">
         <div class="tweet-header">
            <div class="skeleton-line heading" style="width: 60%"></div>
         </div>
         <div class="tweet-text">
            <div class="skeleton-line" style="width: 90%"></div>
            <div class="skeleton-line" style="width: 100%"></div>
            <div class="skeleton-line" style="width: 35%"></div>
         </div>
         
         <div class="skeleton-img"></div>
      
         <div class="tweet-footer">
            <div class="skeleton-button rounded"></div>
            <div class="skeleton-button rounded"></div>
            <div class="skeleton-button rounded"></div>
            <div class="skeleton-button rounded"></div>
         </div>
      </div> 
   </div>
</div>

              
            
!

CSS

              
                $body-bg: #10171E
$item-bg: #15202B
$item-border-color: #38444d

$skeleton-color: lighten($item-bg, 7%)
$skeleton-border-radius: 3px
$skeleton-img-border-radius: .75rem
$skeleton-animation-speed: 1s

=square($size)
   width: $size
   height: $size

%skeleton-animation
   animation: skeleton $skeleton-animation-speed ease-in-out forwards infinite
   animation-direction: alternate

@keyframes skeleton
   0% 
      opacity: .2
      transform: translateY(6px) scale(0.98)
   85%, 100%
      opacity: 1
      transform: translateY(0px) scale(1)
      
// -----------

*
   padding: 0
   margin: 0
   box-sizing: border-box
   
body
   background-color: $body-bg 
   display: flex
   flex-direction: column
   justify-content: center
   align-items: center
   color: white
   min-height: 100vh
   padding: 2rem 1rem

.tweet
   background-color: $item-bg
   padding: .8rem .75rem
   margin: 0 auto
   width: 100%
   max-width: 500px
   border: 1px solid $item-border-color
   border-radius: .5rem
   overflow: hidden
   &-content 
      margin-left: calc(48px + 10px)
   &-header
      @extend %skeleton-animation
      transform-origin: bottom
   &-text
      @extend %skeleton-animation
      animation-delay: 200ms
   &-footer
      display: flex
      margin-top: 1rem
      @extend %skeleton-animation
      transform-origin: bottom
      animation-delay: 400ms
   
.skeleton
   background-color: $item-bg
   &-avatar
      +square(48px)
      background-color: $skeleton-color
      border-radius: 100%
      float: left
      @extend %skeleton-animation
   &-line
      height: .7rem
      background-color: $skeleton-color
      border-radius: $skeleton-border-radius
      margin-bottom: .3rem
      &.heading 
         height: 1rem
         margin-bottom: .5rem
   &-img 
      height: 250px
      background-color: $skeleton-color
      border-radius: $skeleton-img-border-radius
      margin-top: 1.5rem
      @extend %skeleton-animation
      animation-delay: 300ms
   &-button
      display: block
      +square(26px)
      background-color: $skeleton-color
      flex-shrink: 0
      &:not(:last-child)
         margin-right: 2rem
      &.rounded 
         border-radius: 100%

              
            
!

JS

              
                
              
            
!
999px

Console