cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

            
              .l-wrapper
  .header
    header.header
      div(class="header__image decor-image")
      nav.nav
        each val in ['home', 'blog', 'gallery']
          -var itemClass = 'nav__item nav__item--' + val;
          a(href="#", class=itemClass) 
            span #{val}
          
  section.section
    h1 My Blog
    article.article
      time.article__datetime 15.06.2014
      h2.article__title Rainy day
      p Nunc eu accumsan lorem, nec eleifend massa. Integer lobortis bibendum neque a pellentesque. Nunc ullamcorper hendrerit mauris, id gravida turpis facilisis in. 
      footer.article__footer 
        a(href="#") 0 comments
      
      footer.footer
      div(class="footer__image decor-image")
    
    
            
          
!
            
              $base-color: skyblue;
$light-color: #DDD;
$dark-color: crimson;
$headers-font-style: italic;
$radius: .9em;

BODY {
  padding: 2em;
  background: linear-gradient(rgba(0,0,0,.3) 50%, rgba(0,0,0,0)),
    #333;
  font: 16px/1.5 Georgia, serif;
  }

A {
  color: $dark-color;
  transition: all .2s;
  &:hover {
    color: #333;
    }
  }

P {
  margin-top: 1rem;
  }

.l-wrapper {
  width: 500px;
  margin: 0 auto;
  padding: 2rem;
  background: #FFF;
  box-shadow: 0 0 15px rgba(0,0,0,.5);
  }

.decor-image {
  background: url(https://img-fotki.yandex.ru/get/5013/5091629.66/0_56d2b_a38f6a54_L.jpg),
  linear-gradient(90deg,
      salmon 33%, 
      yellow 33%, yellow 66%, 
      skyblue 66%);
  background-blend-mode: luminosity;
  background-position: 50% 50%;
  border-radius: .5rem;
  }
  .header__image {
    height: 185px;
    margin-bottom: 1rem;
    }
  .footer__image {
    height: 50px;
    margin-top: 2rem;
    }

/* 
['multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity','normal']
*/

.nav {
  text-align: center;
  }
  .nav__item {
    display: inline-block;
    position: relative;
    margin: 0 1.5rem;
    text-decoration: none;
    text-transform: capitalize;
    color: #000;
    
    &:hover {
      color: $dark-color;
      }
    
    SPAN {
      display: inline-block;
      position: relative;
      z-index: 1;
      vertical-align: middle;
      width: 90%;
      font-size: 1.2em;
      font-style: italic;
      transition: all .4s;
      }
  }

H1,
H2,
.nav {
  font-style: $headers-font-style;
}

H1 {
  margin: 1rem 0;
  padding: .5rem;
  border-style: solid;
  border-color: $light-color transparent;
  border-width: 2px 0;
  text-align: center;
  font-size: 2em;
  }

H2 {
  margin: 0 0 1rem;
  font-size: 1.5em;
  }

.article {
  color: #333;
  &__datetime {
    float: right;
    line-height: 2.1rem;
    color: #999;
    }
  &__footer {
    margin-top: 1.5em;
    text-align: right;
    }
  }
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console