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

              
                .my-pens
  .author
  .pens
    ul#pens-list
div(class='wrapper')
  div(class='timer')
    div(id='min')
      - for(var i=1;i>=0;i--)
        span(id='min_'+i)=i
    div(id='colon') :
    div(id='sectens')
      - for(var i=6;i>=0;i--)
        - if(i==6)
          span(id='sectens_'+i)=0
        - else
          span(id='sectens_'+i)=i
    div(id='secones')
      - for(var i=60;i>=0;i--)
        - if(i==60)
          span(id='secones_'+i)=0
        - else
          span(id='secones_'+i)=(i%10)       
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Source+Code+Pro:900');

$dark = #ff7e5e
$light = #ff7e5e

html,body
  height: 100%
  padding: 0
  margin: 0
  

  #attribution
    position: fixed
    right: 10px
    bottom: 10px
    color: #ff7e5e
    z-index: 100
    font-weight: bold
    cursor: pointer
    
    a
      color: inherit
      text-decoration: inherit
  
.wrapper
  font-family: 'Source Code Pro', monospace;
  font-weight: 900;
  display: flex
  justify-content: center
  align-items: center
  position: relative
  width: 100%
  height: 100%
  background-color: #FFCF5E
  
.timer
  position: relative
  box-shadow: 0px 50px 0px 100px #FF5E8F;
  
  border: 20px solid $dark
  border-style: none none solid
  border-radius: 5px 5px 0 0
  overflow: hidden
  color: $light
  display: flex
  justify-content: center
  width: 400px
  margin: 0 auto
  font-size: 100px
  
  
  animation: noborder 60s 1, alarm 1s infinite
  animation-delay: 0s, 60s
  animation-fill-mode: forwards
  
  div#min,#sectens,#secones
    text-align: center
    position: relative
    display: flex
    flex-direction: column
    span:not(:first-child) 
      position: absolute
      top: 150px
      left: 0px
  #colon
    position: relative
  #min
    span#min_1
      animation: popout 1s 1
      animation-delay: 0s
      animation-fill-mode: forwards
    span#min_0
      animation: popin 1s 1
      animation-delay: 0s
      animation-fill-mode: forwards
  #sectens
    span#sectens_6
      animation: popout 1s 1
      animation-delay: 0s
      animation-fill-mode: forwards
    for $num in (5..0)
      span#sectens_{$num}
        $delay = (5 - $num) * 10
        $outdelay = ((5 - ($num - 1)) * 10)
        if $num == 0
          animation: popin 1s 1s 1
          animation-delay:  $delay s
        else
          animation: popin 1s 1s 1, popout2 1s 1s 1
          animation-delay:  $delay s,  $outdelay s
        animation-fill-mode:  forwards
  #secones
    span#secones_60
      animation: popout 1s 1
      animation-delay: 0s
      animation-fill-mode: forwards
    for $num in (59..0)
      span#secones_{$num}
        $delay = 59 - $num
        $outdelay = $delay + 1
        if $num == 0
          animation: popin 1s 1
          animation-delay:  $delay s
        else
          animation: popin 1s 1, popout2 1s 1
          animation-delay:  $delay s,  $outdelay s
        animation-fill-mode:  forwards
    
@keyframes popout
  0%
    transform: translateY(0) scale(1)
    opacity: 1
  100%
    transform: translateY(-150px) scale(.8)
    opacity: 0
@keyframes popout2
  0%
    transform: translateY(-150px) scale(1)
    opacity: 1
  100%
    transform: translateY(-300px) scale(.8)
    opacity: 0
@keyframes popin
  0%
    transform: translateY(0) scale(.8)
    opacity: 1
  100%
    transform: translateY(-150px) scale(1)
    opacity: 1
@keyframes alarm
  0%
    transform: rotateZ(0deg)
  10%
    transform: rotateZ(3deg)
  30%
    transform: rotateZ(-3deg)
  45%
    transform: rotateZ(2deg)
  60%
    transform:  rotateZ(-6deg)
  80%
    transform: rotateZ(10deg)
  100%
    transform: rotateZ(0deg)
@keyframes noborder
  from
    border: 5px solid $dark
  to
    border: 5px solid white
              
            
!

JS

              
                //No JS here ;-)
              
            
!
999px

Console