Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                each val in ["note","todo","reminder"]
  .note-item(class = val)
    .preview 
      .falseDoc
      .options
        h2.title Note Title
        small.date 1 May 2017
        a.action(href="#") Edit
        a.action(href="#") Read
    .title-bar
       .type 
       h2.title Nueva Nota
       .delete: i.material-icons delete
              
            
!

CSS

              
                $document-bg: dodgerblue
$line-color: white
=size($w,$h)
  width: $w
  height: $h

*
  box-sizing: border-box
body
  display: flex
  flex-wrap: wrap
.note-item
  +size(30%,270px)
  margin: 3px 1.5%
  border-radius: 4px
  border: 1px solid #aaa
  position: relative
  
  &:after
    content: ' '
    position: absolute
    +size(0,0)
    top: -2px
    right: -2px
    border-bottom: 32px solid transparent
    border-right: 52px solid white
    border-left: 35px solid transparent
    z-index: 200
  &:before
    content: ' '
    position: absolute
    +size(0,0)
    top: -1.2px
    right: -1.2px
    border-bottom: 30px solid #f2f2f2
    border-right: 50px solid transparent
    border-left: 0px solid transparent
    border-radius-bottom: 4px
    z-index: 100
    box-shadow: -2px 2px 3px rgba(0,0,0,.5) 
  &:hover
    .preview .options
      visibility: visible
    
  .preview
    background: $document-bg
    height: 85%
    padding: 20px
    position: relative
    overflow: hidden
    border-radius: 4px 0 0 0
  .options
    position: absolute
    background: rgba(0,0,0,.9)
    top: 0
    left: 0
    +size(100%,100%)
    color: white
    display: flex
    flex-direction: column 
    justify-content: center
    align-items: center
    visibility: hidden
    transition: all ease .3s
  .title-bar
    background: #333
    display: flex
    height: 15%
    justify-content: space-between
    padding: 5px
    color: #f8f8f8
    
  .type
    background: #f8f8f8
    color: #555
    padding: 7px
    font-size: 12px
    border-radius: 4px
    &:after
      content: 'NOTE'
  .title 
    margin: 0
    padding: 0
    color: #f8f8f8
.action
  +size(100px,28px)
  display: block
  color: #ddd
  text-decoration: none
  margin: 5px
  padding: 5px
  text-align: center
  background: transparentize(#fff,.9)
 
  &:hover
    background: transparentize(#fff,.7)
  
.lineas
  +size(100%,10px)
  background: $line-color
  margin: 8px 0
  overflow: hidden
  position: relative
  &:first-child
    width: 30%
    margin: 15px 0
  &:last-child
    width: 50%
    margin: 15px 0
  span
    display: block
    +size(15px,100%)
    background: $line-color
    animation: cargando 3s
  
.todo
  .lineas
    &:after
      content: ''
      +size(20px,100%)
      position: absolute
      background: $document-bg
      top: 0
      left: 20px
    
    &:before
      content: '\2718'
      +size(15px,100%)
      position: absolute
      border: 1px solid #ccc
      top: 0
      left: 0
      color: $document-bg
      padding: 0 6px
      font-size: 9px
  .type
    &:after
      content: 'TODO'

@keyframes cargando
  0% 
    background: transparentize($document-bg,.8)
    transform: translate(0%,0)
  50%
    transform: translate(1800%,0)
  100% 
    background: transparentize($document-bg,0)
    transform: translate(-20px,0)

.reminder
  .falseDoc
    border-radius: 50%
    overflow: hidden
    background: rgba(0,0,0,.05)
    position: relative
    &:after
      content: ''
      +size(3%,40%)
      background: $line-color
      border: 2px solid darken($document-bg,5%)
      border-bottom: none
      position: absolute
      left: 45%
      top: 9%
      z-index: 200
    &:before
      content: ''
      +size(2%,30%)
      background: $line-color
      border: 2px solid darken($document-bg,5%)
      position: absolute
      left: 58%
      top: 41%
      transform: rotate(120deg)
      z-index: 100
  .type
    &:after
      content: 'REM'
              
            
!

JS

              
                $(function(){
  
  makeLines()
  
  function makeLines(){
    var lineas = " "
  
  for(var i = 1; i < 10; i++){
    lineas += `<div class="lineas num${i}"><span></span></div>`
  }
  $(".falseDoc").html(lineas) 
  }
})

              
            
!
999px

Console