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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                .watch
  .face
    .numbers
      each $n in [1,2,3,4,5,6,7,8,9,10,11,12]
        div(class="number number-" + $n) 
          span #{$n}
      
    .arms
      .arm.arm-hour
      .arm.arm-minute
      .arm.arm-second
        .body
    
              
            
!

CSS

              
                $blue: #a9d4d5;
$otherBlue: #b2e6e7;

body{
  width:100%;
  height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  background-image: linear-gradient(to right,  
    $blue 10%,
    $otherBlue 10%, 12%,
    $blue 12%,
    $blue 20%,
    $otherBlue 20%, 22%,
    $blue 22%,
    $blue 30%,
    $otherBlue 30%, 32%,
    $blue 32%,
    $blue 40%,
    $otherBlue 40%, 42%,
    $blue 42%,
    $blue 50%,
    $otherBlue 50%, 52%,
    $blue 52%,
    $blue 60%,
    $otherBlue 60%, 62%,
    $blue 62%,
    $blue 70%,
    $otherBlue 70%, 72%,
    $blue 72%,
    $blue 80%,
    $otherBlue 80%, 82%,
    $blue 82%,
    $blue 90%,
    $otherBlue 90%, 92%,
    $blue 92%
  );
}
.face{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  width:400px; 
  height:400px;
  background:#eee;
  background-image: linear-gradient(to bottom right, #eee, #f5f5f5);
  border-radius: 50%;
  padding:20px;
  border:20px solid #d9d9d9;
  box-shadow:20px 20px 30px -10px rgba(black, .4), inset 10px 10px 20px rgba(black, .2);
  
  &:after{
    display:block;
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    content:"";
    border-radius:50%;
    z-index:9999;
    background-image: linear-gradient(to bottom right, rgba(white, 0) 0%, 59%, rgba(white,.7) 60%, rgba(white, 0) 80%), linear-gradient(to bottom right, rgba(white, 0) 0%, 30%, rgba(white, .3) 35%, rgba(white,.5) 40%, rgba(white, 0) 45%);
  }
}

.numbers {
  position:relative;
}
.number{
  position:absolute;
  height:200px;
  transform-origin: 0 100%;
  font-size: 28px;
  
  @each $n in 1,2,3,4,5,6,7,8,9,10,11,12 {
    $amt:360/12*$n - 5; //- 2 to level out text
    &:nth-child(#{$n}){
      transform: rotate($amt+deg);
      
      span{
        display:block;
        transform:rotate( (-$amt)+deg);
      }
    }
  }
}

.arms{
  position:absolute;
  top:50%;
  left:50%;
  
  &:after{
    display:block;
    position:absolute;
    top:50%;
    left:50%;
    width:30px;
    height:30px;
    content:"";
    background:#ccc;
    border-radius:50%;
    transform:translate(-50%, -50%);
    z-index:999;
  }
}
.arm{
  position:absolute;
  top:50%;
  left:50%;
  height:120px;
  width:10px;
  content:"";
  background:black;
  transform:translate(-50%, -100%);
  border-radius:0 0 20px 20px;
    transform-origin:50% 100%;
  z-index:4;
  animation: count 3600s linear  infinite;
  
  &:after{
    display:block;
    content:"";
    position:absolute;
    left:0;
    bottom:0;
    width:80%;
    height:calc(100% + 50px);
    // background:rgba(black, .5);
    background-image: linear-gradient(to top, rgba(black, .8), transparent 70%);
    z-index:1;
    animation: moveShadow 3600s linear infinite;
    transform-origin:50% 100%;
  }
  
  &:before{
    display:block;
    position:absolute;
    top:-50px;
    width:0;
    height:0;
    border:10px solid transparent;
    border-width: 10px 5px 41px;
    border-bottom-color:black;
    content:"";
  }
  
  &.arm-hour{
    height:70px;
    transform: translate(-50%, -100%) rotate(30deg);
    animation: count 3600s * 60 linear  infinite;
    
    &:after{
    animation: moveShadow 3600s * 60 linear infinite;
    }
  }
  
  &.arm-second{
    height:130px;
    width:8px;
    transform: translate(-50%, -100%) rotate(60deg);
    z-index:3;
    background:red;
    animation: count 60s linear infinite;
    
    &:after{
      
    animation: moveShadow 60s linear infinite;
    }
    
    .body{
      display:block;
      position:relative;
      top:0;
      left:0;
      width:100%;
      height:100%;
      content:"";
      background:red;
      z-index:4;
    }
    
    &:before{
      border-width:10px 4px 41px;
      border-bottom-color:red;
      z-index:-1;
    }
  }
}

@keyframes count {
  0%, 100% {
    transform: translate(-50%, -100%);
  }
  25%{
    transform: translate(-50%, -100%) rotate(90deg);
  }
  50%{
    transform: translate(-50%, -100%) rotate(180deg);
  }
  75%{
    transform: translate(-50%, -100%) rotate(270deg);
  }
}

@keyframes moveShadow {
  0%, 100%, 5%{
    transform: rotate(5deg);
  }
  10%{
    transform: rotate(8deg);
  }
  40%, 90%{
    transform:rotate(0deg);
  }
  70%{
    transform: rotate(-5deg);
  }
}
              
            
!

JS

              
                //nope, there's none
              
            
!
999px

Console