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

              
                %div.container
  %div.canvas
    %div.sidelight.left
      - 3.times do
        %div.light
    %div.body
      %div.light.red
      %div.light.yellow
      %div.light.green
    %div.sidelight.right
      - 3.times do
        %div.light
              
            
!

CSS

              
                @import "bourbon";
html,
body {
  width: 100%;
  height: 100%;
  @include linear-gradient(130deg, #554D4A 0%, #fff 50%, #524B45 100%);
}

.container {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 280px;
  @include transform(translate(0, -50%));
}

.canvas {
  width: 100%;
  height: 100%;
  position: relative;
  &:before {
    position: absolute;
    top: -10px;
    left: 82.5px;
    z-index: 2;
    border-radius: 5px;
    content: "";
    width: 110px;
    height: 370px;
    @include linear-gradient(180deg, #000 0%, #555 2%, #000 10%);
  }
  &:after {
    position: absolute;
    top: -30px;
    left: 97.5px;
    right: 0;
    z-index: 1;
    border-radius: 100%;
    content: "";
    width: 80px;
    height: 40px;
    @include radial-gradient(#555 0%, #333 50%, #000 100%);
  }
}

.body {
  width: 150px;
  height: 350px;
  float: left;
  background: #222;
  border-radius: 10px;
  padding-top: 5px;
  position: relative;
  z-index: 3;
  @include linear-gradient(90deg, #000 0%, #555 5%, #000 10%, #555 90%, #ccc 95%, #000 100%);
  .light {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 100%;
    margin: 0 auto 5px auto;
    @include linear-gradient(180deg, #555 0%, #999 75%, #333 75%, #555 100%);
    &:before {
      width: 104px;
      height: 104px;
      content: "";
      position: absolute;
      top: 3px;
      left: 3px;
      border-radius: 100%;
      background: #000;
    }
    &:after {
      width: 98px;
      height: 98px;
      content: "";
      position: absolute;
      top: 6px;
      left: 6px;
      border-radius: 100%;
      opacity: .2;
    }
    &.red {
      &:after {
        @include radial-gradient(#fe0000 0%, #890000 60%, #333 100%);
        animation: openthelight-red 10s 2s infinite;
        box-shadow: 0px 0px 30px 0px #fe0000;
      }
    }
    &.yellow {
      &:after {
        @include radial-gradient(#ffd800 0%, #858300 60%, #333 100%);
        animation: openthelight-yellow 10s 2s infinite;
        box-shadow: 0px 0px 30px 0px #ffd800;
      }
    }
    &.green {
      &:after {
        @include radial-gradient(#24be00 0%, #266600 60%, #333 100%);
        animation: openthelight-green 10s 2s infinite;
        box-shadow: 0px 0px 30px 0px #24be00;
      }
    }
  }
}

.sidelight {
  width: 65px;
  height: 350px;
  float: left;
  .light {
    position: relative;
    width: 65px;
    height: 110px;
    margin-top: 5px;
    overflow: hidden;
    &:first-child {
      margin-top: 10px;
    }
    &:before {
      position: absolute;
      top: 0;
      content: "";
      width: 220px;
      height: 220px;
      border-radius: 100%;
      @include linear-gradient(180deg, #000 50%, #555 80%, #333 90%, #555 100%);
    }
  }
  &.right {
    .light {
      &:before {
        right: 0;
        top: -120%;
      }
    }
  }
  &.left {
    .light {
      &:before {
        left: 0;
        top: -120%;
      }
    }
  }
}

@keyframes openthelight-red {
  0% {
    opacity: .2;
  }
  10% {
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  70% {
    opacity: .2;
  }
  100% {
    opacity: .2;
  }
}

@keyframes openthelight-yellow {
  0% {
    opacity: .2;
  }
  30% {
    opacity: .2;
  }
  40% {
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  70% {
    opacity: .2;
  }
  100% {
    opacity: .2;
  }
}

@keyframes openthelight-green {
  0% {
    opacity: .2;
  }
  60% {
    opacity: .2;
  }
  70% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: .2;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console