Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="landscape">
  <div class="glow"></div>
</div>
<div class="yule">
  <div class="fire">
    <div class="flame"></div>
    <div class="flame"></div>
    <div class="flame"></div>
  </div>
  <div class="log"></div>
  <div class="glow"></div>
</div>
            
          
!
            
              @import compass

$color-landscape: rgba( 12, 35, 40, 1 )
$color-log: rgba( 49, 36, 15, 1 )
  
$color-flame-yellow: rgba( 255, 250, 55, 1 )
$color-flame-red: rgba( 255, 44, 14, 1 )
  
@include keyframes( cast-light )
  100% 
    @include translate( -5% , -2% )
  90%
    @include translate( 7% , 1% )
  76%
    @include translate( -5% , 1% )
  68%
    @include translate( 12% , -3% )
  60%
    @include translate( -6% , 1% )
  46%
    @include translate( 9% , -3% )
  32%
    @include translate( 7% , 1% )
  26%
    @include translate( -5% , -3% )
  16%
    @include translate( -9% , 1% )
  10%
    @include translate( 5% , 1% )
  0%
    @include translate( -5% , -2% )

@include keyframes( flicker )
  100%
    transform: rotate( 1deg ) skew( -2deg ) scale( 1 , 1 )
  84%
    transform: rotate( 2deg ) skew( -2deg ) scale( 0.8 )
  58%
    transform: rotate( 6deg ) skew( -3deg ) scale( 0.9 )
  36%
    transform: rotate( -4deg ) skew( 3deg ) scale( 1 )
  21%
    transform: rotate( 2deg ) skew( -3deg ) scale( 0.9 )
  0%
    transform: rotate( 0deg ) skew( 2deg ) scale( 1 , 1 ) 

html , body
  position: absolute
  overflow: hidden
  height: 100%
  width: 100%
  left: 0
  top: 0
  
body
  background-color: $color-landscape
  
.landscape
  overflow: hidden
  background-color: tint( $color-landscape , 5% )
  border-radius: 50%
  top: calc( 50% + 6vh )
  position: absolute
  bottom: -30vh
  right: -15vw
  left: -15vw
    
  .glow
    opacity: 0.35
    
.glow
  @include scale( 1.2 , 0.3 )
  position: absolute
  top: 7vh
  left: 50%
    
  &:before , &:after
    content: ""
    position: absolute
    margin-top: -1vh
    margin-left: -6vh
    border-radius: 50%
    width: 12vh
    height: 3vh
      
  &:after
    @include animation( cast-light 2s ease-in-out -0.2s infinite alternate none )
    box-shadow: 0 0 20vh 10vh $color-flame-red
    background-color: $color-flame-red

  &:before
    @include animation( cast-light 2.6s ease-in-out -0.4s infinite alternate none )
    box-shadow: 0 0 20vh 10vh $color-flame-yellow
    background-color: $color-flame-yellow
      
.yule
  @include transform( translate( -50% , -50% ) scale( 1 ))
  position: absolute
  margin-top: 6vh
  left: 50%
  top: 50%
  
  .glow
    @include transform( scale( 0.73 , 0.45 ) rotate( 180deg ))
    opacity: 0.35
    margin-top: -8vh
    z-index: 3
      
  .fire
    z-index: 2
    position: absolute
    top: -10vh
    left: -2.5vh
    
    .flame
      @include transform-origin( 50% , 90% )
      position: absolute
      border-bottom-right-radius: 6vh
      border-bottom-left-radius: 6vh
      border-right: 3vh solid transparent
      border-left: 3vh solid transparent
      opacity: 0.85
        
      &:nth-of-type( 1 )
        border-bottom: 7vh solid rgba( $color-flame-yellow , 0.5 )
        @include animation( flicker 1.1s ease-in-out -0.4s infinite alternate none )
        margin-left: -2vh
        margin-top: 2vh
          
        &:before
          @include animation( flicker 0.7s ease-in-out -0.2s infinite alternate none )
          margin-top: 0vh
          
        &:after
          @include animation( flicker 0.6s ease-in-out -1.2s infinite alternate none )
          margin-top: 3vh
          
      &:nth-of-type( 2 )
        border-bottom: 9vh solid rgba( $color-flame-yellow , 0.5 )
        @include animation( flicker 1.0s ease-in-out -0.9s infinite alternate none )
        margin-left: 0vh
        margin-top: 0vh
          
        &:before
          @include animation( flicker 0.9s ease-in-out -9.2s infinite alternate none )
          margin-top: 2vh
          
        &:after
          @include animation( flicker 0.5s ease-in-out -6.2s infinite alternate none )
          margin-top: 5vh
          
      &:nth-of-type( 3 )
        border-bottom: 8vh solid rgba( $color-flame-yellow , 0.5 )
        @include animation( flicker 1.3s ease-in-out -0.3s infinite alternate none )
        margin-left: 2vh
        margin-top: 1vh
          
        &:before
          @include animation( flicker 0.7s ease-in-out -1.2s infinite alternate none )
          margin-top: 1vh
          
        &:after
          @include animation( flicker 0.6s ease-in-out -2.2s infinite alternate none )
          margin-top: 4vh
      
      &:before , &:after
        content: ""
        position: absolute
        @include transform-origin( 50% , 90% )
          
      &:before
        margin-left: -2.5vh
        border-bottom-right-radius: 6vh
        border-bottom-left-radius: 6vh
        border-bottom: 7vh solid rgba( $color-flame-red , 0.25 )
        border-right: 2.5vh solid transparent
        border-left: 2.5vh solid transparent
        
      &:after
        margin-left: -1vh
        border-bottom-right-radius: 6vh
        border-bottom-left-radius: 6vh
        border-bottom: 4vh solid rgba( $color-flame-yellow , 0.3 )
        border-right: 1vh solid transparent
        border-left: 1vh solid transparent
  
  .log
    @include scale( 0.5 , 1 )
    position: absolute
    left: -25vh
    top: -2.5vh
    background-color: $color-log
    box-shadow: 0 1vh 12vh 1.5vh rgba( shade( $color-log , 30% ) , 0.75 ), 0 0vh 4vh 0vh rgba( shade( $color-log , 40% ) , 0.75 ) inset
    border-radius: 10vh
    position: absolute
    width: 50vh
    height: 10vh
    z-index: 1
      
    &:before
      content: ""
      background-color: tint( $color-log , 40% )
      box-shadow: 0 0 0 1vh tint( $color-log , 35% ) inset, 0 0 0 2vh tint( $color-log , 30% ) inset, 0 0 0 3vh tint( $color-log , 45% ) inset, 0 0 0 4vh tint( $color-log , 40% ) inset
      border-radius: 50%
      position: absolute
      opacity: 0.5
      height: 9vh
      width: 9vh
      left: 0.5vh
      top: 0.5vh
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console