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

              
                .container
  .track
    .bubble 🔥
  
              
            
!

CSS

              
                $CONTAINER_SIZE: 300px
$BUBBLE_SIZE: 80px
$BUBBLE_COLOR: rgba(#fff, 0.9)

html, body
  height: 100%
  
body
  align-items: center
  background: #333
  display: flex
  justify-content: center
  margin: 0
  
.container
  background: tomato
  border-radius: 8px
  height: $CONTAINER_SIZE
  position: relative
  width: $CONTAINER_SIZE
  
  &::after
    background: rgba(#000, 0.1)
    content: ''
    height: 3px
    position: absolute
    top: ($CONTAINER_SIZE +  $BUBBLE_SIZE)/2
    left: 0
    right: 0

.track
  animation: swivel 6s ease-in-out alternate infinite
  display: flex
  flex-direction: row-reverse
  height: $BUBBLE_SIZE
  position: absolute
  right: -$BUBBLE_SIZE
  top: $CONTAINER_SIZE/2 - $BUBBLE_SIZE/2 - 12px
  transform: translate(-$BUBBLE_SIZE/2, 0)
  
.bubble
  background: $BUBBLE_COLOR
  flex-grow: 0
  flex-shrink: 0
  font-size: 24px
  height: 100%
  line-height: $BUBBLE_SIZE
  text-align: center
  width: $BUBBLE_SIZE
  
  &::before
    $CIRCLE_SIZE: 8px
    background: rgba(#000, 0.33)
    border-radius: 50%
    content: ''
    height: $CIRCLE_SIZE
    left: ($BUBBLE_SIZE - $CIRCLE_SIZE)/2
    position: absolute
    bottom: -$CIRCLE_SIZE/2 - 12px - 1.5px
    width: $CIRCLE_SIZE
    display: block
  
  &::after
    border-left: 6px solid transparent
    border-right: 6px solid transparent
    border-top: 12px solid $BUBBLE_COLOR
    content: ''
    height: 0
    left: $BUBBLE_SIZE/2 - 6px
    position: absolute
    top: 100%
    width: 0
  
.track
  &::before, &::after
    content: ''
    height: 100%
    width: $BUBBLE_SIZE/2

  &::before
    flex-shrink: 1
    min-width: $BUBBLE_SIZE/2
    width: $CONTAINER_SIZE - $BUBBLE_SIZE/2
  
  &::after
    flex-grow: 0
    flex-shrink: 999999999999999 // lol
  
@keyframes swivel
  from
    left: 6px
    
  to
    left: $CONTAINER_SIZE - 6px

              
            
!

JS

              
                // Wait where's the JS...?

              
            
!
999px

Console