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

              
                mixin navs (name)
  a(href="#").flex-sm-fill.text-sm-center.nav-link #{name}

mixin infocard (id, title, cardIcon, data, hintIcon, cardHint)
  .col-12.col-sm-6.col-md-6.col-lg-3
    .card(id=id)
      .card-title #{title}
      .card-icon
        i.material-icons #{cardIcon}
      .card-data #{data}
      hr
      .card-hint 
        i.material-icons #{hintIcon}
        a(href="#") #{cardHint}

body
  .container
    h1#page-title.text-center Making cards...
    .row#portfolio
      +infocard('storageCard', 'Used space', 'storage', '99/100 GB', 'warning', 'Get more space')
      +infocard('loveCard', 'Love received', 'favorite', '101%', 'share', 'Share the love ASAP =)')
      +infocard('pizzaCard', 'Pizza eaten', 'local_pizza', '12 pcs', 'local_drink', 'Drink some Cola')
      +infocard('gameCard', 'Games played', 'videogame_asset', '1800+ hours', 'code', 'You better learn to code')

    
    

              
            
!

CSS

              
                body
  padding: 32px
  background: #ddd
  font-family: 'Roboto', sans-serif
h1
  color: rgba(255,255,255,.95)
  text-shadow: 0px 12px 16px rgba(0,0,0,.2)
  margin: 100px auto
#about
  padding: 16px
.bdr
  border: 1px solid red
#ava
#portfolio
  background: #fafafa
  padding: 8px 0
  .card
    margin: 0 -8px 32px -8px
    color: rgba(0,0,0,.87)
    box-shadow: 2px 2px 8px rgba(0,0,0,.05)
    .card-title
      display: flex
      justify-content: flex-end
      padding: 16px
      font-weight: 300
      
    .card-data
      display: flex
      justify-content: flex-end
      padding: 16px 16px 0 0
      font-size: 1.5rem
      font-weight: 300
    hr
      width: 90%
    .card-hint
      display: flex
      padding: 0 0 8px 8px
      i
        font-size: 1.3rem
        color: red
        margin-right: 8px
      font-size: .9rem
      font-weight: 300
    .card-icon
      display: flex
      position: absolute
      top: -20px
      left: 12px
      background: linear-gradient(60deg, #ffa726, #EF6C00)
      color: white
      width: 90px
      height: 90px
      box-shadow: 2px 2px 16px rgba(0,0,0,.15)
      align-items: center
      justify-content: center
      border-radius: 25%
      i
        font-size: 4rem
  #storageCard
    .card-icon
      background: linear-gradient(60deg, #5E35B1, #039BE5)
    .card-hint
      i
        color: red
  #loveCard
    .card-icon
      background: linear-gradient(60deg, #F50057, #FF8A80)
    .card-hint
      i
        color: blue
  #pizzaCard
    .card-icon
      background: linear-gradient(60deg, #fb8c00, #FFCA29)
    .card-hint
      i
        color: red
  #gameCard
    .card-icon
      background: linear-gradient(60deg, #43A047, #FFEB3B) 
    .card-hint
      i
        color: green
              
            
!

JS

              
                
              
            
!
999px

Console