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

              
                <div id="timesheet"></div>
              
            
!

CSS

              
                /* timesheet.css */
.timesheet
  width: 720px
  height: 292px
  margin: 0 auto
  border-top: 1px solid rgba(250,250,250,0.5)
  background-color: #333
  position: relative
  
  &.color-scheme-default
    .bubble-default
      background-color: RGBA(252, 70, 74, 1)
    .bubble-lorem
      background-color: RGBA(154, 202, 39, 1)
    .bubble-ipsum
      background-color: RGBA(60, 182, 227, 1)
    .bubble-dolor
      background-color: RGBA(244, 207, 48, 1)
    .bubble-sit
      background-color: RGBA(169, 105, 202, 1)
    .bubble-default
      background-color: #f3552e
    .bubble-lorem
      background-color: #88c33a
    .bubble-ipsum
      background-color: #436ae0
    .bubble-dolor
      background-color: #f4d234
    .bubble-set
      background-color: #707d86
  .scale
    height: 100%
    position: absolute
    top: 0
    left: 0
    float: left
    section
      float: left
      width: 59px
      text-align: center
      color: rgba(250,250,250,0.8)
      font-family: "Signika Negative"
      font-size: 13px
      line-height: 24px
      font-weight: lighter
      border-left: 1px dashed rgba(250,250,250,0.2)
      height: 100%
  .data
    margin: 28px 0 0 0
    padding: 0
    text-align: left
    list-style-type: none
    color: rgba(250,250,250,0.8)
    font-family: "Signika Negative"
    font-size: 13px
    overflow: hidden
    li
      margin: 0 0 3px 0
      line-height: 22px
      height: 21px
      display: block
      cursor: pointer
      clear: both
      position: relative
      white-space: nowrap
      &:hover .bubble
        opacity: 1
      .date
        color: #b5b5b5
        font-size: 14px
      .label
        font-weight: lighter
        font-size: 14px
        padding-left: 5px
        line-height: 21px
        color: #979796
        white-space: nowrap
      .bubble
        width: 24px
        height: 7px
        display: block
        float: left
        position: relative
        top: 7px
        border-radius: 4px
        margin: 0 10px 0 0
        opacity: 0.7

#timesheet-alternative
  background-color: RGBA(247, 247, 247, 1)
  border-radius: 5px
  section
    color: RGBA(63, 68, 72, 1)
    border-left: 1px dashed RGBA(63, 68, 72, 0.2)
    &:first-child
      border-left: 1px dashed transparent
  .date
    display:none
  .bubble
    margin-right: 7px
  .label
    padding-left: 0px
    color: RGBA(48, 48, 48, 1)
              
            
!

JS

              
                new Timesheet('timesheet', 2002, 2013, [
  ['2002', '09/2002', 'A freaking awesome time', 'lorem'],
  ['06/2002', '09/2003', 'Some great memories', 'ipsum'],
  ['2003', 'Had very bad luck'],
  ['10/2003', '2006', 'At least had fun', 'dolor'],
  ['02/2005', '05/2006', 'Enjoyed those times as well', 'ipsum'],
  ['07/2005', '09/2005', 'Bad luck again', 'default'],
  ['10/2005', '2008', 'For a long time nothing happened', 'dolor'],
  ['01/2008', '05/2009', 'LOST Season #4', 'lorem'],
  ['01/2009', '05/2009', 'LOST Season #4', 'lorem'],
  ['02/2010', '05/2010', 'LOST Season #5', 'lorem'],
  ['09/2008', '06/2015', 'FRINGE #1 & #2', 'ipsum']
]);
              
            
!
999px

Console