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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

              
                //- Pencil
mixin pencil
  .pencil-container
    .tip    
    .wood
    .yellow
    .metal
    .eraser

//- Book
mixin book
  .book
    .backShadow    
      .noteBox
        .noteLine
        .noteLine2     
      .blueCover

//- Keyoboard
mixin keyboard
  .keyboard
    .key-row 
      .key.one ~
      .key.one 1
      .key.one 2
      .key.one 3
      .key.one 4
      .key.one 5
      .key.one 6
      .key.one 7
      .key.one 8
      .key.one 9
      .key.one 0
      .key.one -
      .key.one =
      .key.two backspace

    .key-row 
      .key.one-one-half.l tab
      .key.one q
      .key.one w
      .key.one e
      .key.one r
      .key.one t
      .key.one y
      .key.one u
      .key.one i
      .key.one o
      .key.one p
      .key.one [
      .key.one ]
      .key.one \

    .key-row 
      .key.one-one-half.l search
      .key.one a
      .key.one s
      .key.one d
      .key.one f
      .key.one g
      .key.one h
      .key.one j
      .key.one k
      .key.one l
      .key.one ;
      .key.one '
      .key.two.r enter

    .key-row 
      .key.two-two-half.l shift
      .key.one z
      .key.one x
      .key.one c
      .key.one v
      .key.one b
      .key.one n
      .key.one m
      .key.one &lt;
      .key.one >
      .key.one /
      .key.two-two-half.r shift
    
    .key-row 
      .key.two.l ctrl
      .key.two.l alt
      .key.five
      .key.one-one-half alt
      .key.one ctrl
      .arrowkey-container.two-two-half 

body
  +pencil
  +pencil
  
  +book
  
  .postIt
  
  +keyboard
              
            
!

CSS

              
                body {
  background: rgb(233,223,196);
  
  background: linear-gradient(left, rgba(233,223,196,1) 0%,rgba(233,223,196,1) 1%,rgba(237,227,200,1) 2%,rgba(237,227,200,1) 24%,rgba(235,221,195,1) 25%,rgba(233,223,196,1) 48%,rgba(235,221,195,1) 49%,rgba(230,216,189,1) 52%,rgba(230,216,189,1) 53%,rgba(233,219,192,1) 54%,rgba(230,216,189,1) 55%,rgba(230,216,189,1) 56%,rgba(233,219,192,1) 57%,rgba(230,216,189,1) 58%,rgba(230,216,189,1) 73%,rgba(233,219,192,1) 74%,rgba(233,219,192,1) 98%,rgba(235,221,195,1) 100%);

  background-size: 120px;
  background-repeat: repeat;
  height: 100%;
  width: 100%;
}

/**
 * PENCIL
**/
.pencil-container {
  display: flex;
  transform: rotate(-30deg);
  margin-left: 70%;
  margin-top: -70px;
  
  &:first-child {
    opacity: .1;
    margin-top: 170px;
    margin-left: 71%;
    transform: rotate(-20deg);
    
    div, div:before, div:after { background: black; }
  }
  .tip {
    position: relative;
    left: 27px;
    top: -7px;
    background-color: #000;
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
    width: 14px;
    height: 10px;
  }

  .wood {
    position: relative;
    bottom: 20px;
    left: 27px;
    z-index: 2;
    width: 60px;
    height: 36px;
    background:  linear-gradient(to bottom, #f2daad 0%, #d1945c 48%, #ab6b35 83%, #86491d 100%);
    clip-path: polygon(40px 0, 100% 25%, 100% 75%, 40px 100%, -15px 50%);
  }

  .yellow {
    position: relative;
    z-index: 4;
    width: 300px;
    height: 22px;
    margin-top: -6px;
    background-color: #F3B63D;
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
    &:before {
      display: block;
      content: '';
      width: 300px;
      height: 16px;
      border-top-left-radius: 12px;
      border-bottom-left-radius: 12px;
      position: relative;
      bottom: 15px;
      background-color: #FEE49B;
    }

  }

  .metal {
    position: relative;
    bottom: 20px;
    z-index: 5;
    width: 45px;
    height: 36px;
    background: linear-gradient(to bottom, #b1adad 0%, #fefefe 8%, #fefefe 34%, #a1a0a0 62%, #393536 66%, #8d8989 77%, #aba7a7 91%, #716d6d 100%);
    border-top-right-radius: 20% 80%;
    border-bottom-right-radius: 20% 80%;
    display: flex;
    &:before, &:after {
      content: '';
      display: block;
      width: 2px;
      height: 36px;
      background: linear-gradient(to bottom, #8f8d8d 0%, #e8e8e8 8%, #dedede 34%, #8a8a8a 62%, #292727 66%, #6b6868 77%, #999696 91%, #575454 100%);
      margin-left: 5px;
    }
  }

  .eraser {
    position: relative;
    bottom: 20px;
    right: 5px;
    z-index: 1;
    width: 20px;
    height: 36px;
    background: linear-gradient(to bottom, #ef8865 0%, #b23c26 48%, #a94932 100%);
    border-top-right-radius: 80%;
    border-bottom-right-radius: 80%;
  }
}

/**
 * BOOK
**/
.book {
  width: 200px;
  margin: auto;
  position: absolute;
  left: 5%;
  top: 100px;
  
  .backShadow {
    width:195px;
    height: 295px;
    position: relative;
    border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
    background: rgba(0,0,0,0.6);
    
    .blueCover {
      position: absolute;
      top: -5px;
      left:-10px;
      background:#3f9fc9;
      margin: 0 auto;
      height:300px;
      width:200px;
      border-top-right-radius: 10px;
      border-bottom-right-radius: 10px;
      box-shadow: inset 37px 0px 0px #398fb5;
      z-index: 4;
    }
    .noteBox {
      width:90px;
      height:50px;
      background:#f4f4f4;
      z-index: 5;
      position: absolute;
      left:75px;
      top:50px;
      
      .noteLine {
        background:#dbdbdb;
        height:10px;
        width:70px;
        margin:10px 0 0 10px;
      }
      .noteLine2 {
        background:#dbdbdb;
        height:10px;
        width:50px;
        margin:10px 0 0 10px;
      }
    }
  }
}

/**
 * Post-Its
**/
.postIt {
  position: absolute;
  bottom: 145px;
  left: 80%;
  width: 100px;
  height: 20px;
  box-shadow: 0 20px 0 #F47674, 
              0 37px 0 #fff799, 
              0 39px 0 #b5b4ab, 
              0 56px 0 #fff799, 
              0 58px 0 #b5b4ab, 
              0 75px 0 #fff799, 
              0 77px 0 #b5b4ab, 
              0 96px 0 #fff799, 
              0 98px 0 #b5b4ab, 
              0 111px 0 #fff799, 
              0 120px 0 #e8db79;
}

/**
 * KEYBOARD
**/
.keyboard {
  position: absolute;
  margin:auto;
  left: 25%;
  top: -20px;
  width:40%;
  height:200px;
  background:#bbb;
  padding:30px 10px;
  border-radius:10px;
  border-bottom:6px solid #999;
  
  .key-row {
    display:-webkit-flex;
    margin:0 auto 7px;
    line-height:30px;
  }

  .key, .arrowkey-container {
     margin:0 6px 0 0; 
     text-align:center;
  }

  .key { 
    background:#444;
    color:#eee;
    border-radius:4px;
    box-shadow:0 1px 0 #222, inset 0 1px 3px rgba(255,255,255,0.1);
    transition:0.1s;
    align-items:center;
    align-content:center;
    height:30px;
    border:2px solid rgba(0,0,0,0.08);
    cursor:pointer;
    font-size: 12px;
    
    &:active { 
      transform:translateY(1px); 
      background:#333; 
      box-shadow:0 1px 0 #000;
    }
    &:last-child { margin:0; }
    
    &.one { flex:1; } /* one */
    &.one-one-half { flex:1.5; } /* One and one half */
    &.two { flex:2; } /* two */
    &.two-two-half { flex:2.5; } /* Two and two half */
    &.three { flex:3; } /* three */
    &.five { flex:5; }
  }

  .l { text-align:left; padding-left:12px; }
  .r { text-align:right; padding-right:12px; }
}
              
            
!

JS

              
                
              
            
!
999px

Console