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

              
                <body data-max-width="1400" data-auto-extend="true">

  <article data-high="1">
    <section data-cols="2">
      <div class="move--center">
        <img  src="http://timpietrusky.com/img/tim_pietrusky_on_rampage.jpg" alt="" />
      </div>
      <div class="move--center">
        <h1>Tim Pietrusky</h1>
        <p>I'm a Webcraftsman from Frankfurt (Main), Germany and I love the web.</p>
        <p>
          <a href="http://timpietrusky.com" target="_blank">timpietrusky.com</a>
        </p>
      </div>
    </section>
  </article>
  
<!-- I write -->
  <article data-high="2">
    <section data-cols="1" class="section--alpha">
      <div class="move--left">
        <h2>I write</h2>
      </div>
    </section>
     
     <section data-cols="2">
      <div>
        <h3>for css-tricks.com</h3>
        <ul class="list--alpha">
          <li><a href="https://css-tricks.com/responsive-menu-concepts/">Responsive Menu Concepts</a></li>
          <li><a href="https://css-tricks.com/five-use-cases-for-icon-fonts/">5 Use Cases for Icon Fonts</a></li>
        </ul>
      </div>
      <div>
        <h3>on timpietrusky.com</h3>
        <ul class="list--alpha">
          <li><a href="http://timpietrusky.com/advanced-checkbox-hack/">Advanced Checkbox Hack</a></li>
          <li><a href="http://timpietrusky.com/tims-dev-diary-march-2013">Tim's Dev Diary: March 2013</a></li>
          <li><a href="http://timpietrusky.com/svg-how-to-create-and-use-vector-graphics-on-the-web">SVG - How to create & use vector graphics on the web</a></li>
          <li><a href="http://timpietrusky.com/breaking-bad-logo">Breaking Bad Logo</a></li>
        </ul>
      </div>
     </section>
  </article>
  
<!--  Everything I do is open source -->
  <article data-high="2">
    <section data-cols="1" class="section--beta">
      <div class="move--right">
        <h2>Everything I do is open source</h2>
      </div>
    </section>
     
     <section data-cols="2">
      <div>
        <h3>Experiments on CodePen</h3>
        <ul class="list--alpha list--alpha__mod">
          <li><a href="https://codepen.io/TimPietrusky/pen/gqlhA">Custom Dropdown</a></li>
          <li><a href="https://codepen.io/TimPietrusky/pen/guAGh">Colorful stripes</a></li>
          <li><a href="https://codepen.io/TimPietrusky/pen/eaqFb">asdf</a></li>
          <li><a href="https://codepen.io/TimPietrusky/pen/oJIcy">SNES Controller</a></li>
          <li><a href="https://codepen.io/TimPietrusky/pen/Bsegb">Breaking Bad Logo</a></li>
          <li><a href="https://codepen.io/TimPietrusky/pen/pxCct">Random String to CSS color converter</a></li>
        </ul>
      </div>
      <div>
        <h3>Projects on GitHub</h3>
        <ul class="list--alpha list--alpha__mod">
          <li><a href="https://github.com/TimPietrusky/grumpycathatesyou">Grumpy Cat meme generator</a></li>
          <li><a href="https://github.com/TimPietrusky/weloveiconfonts">We Love Icon Fonts</a></li>
          <li><a href="https://github.com/TimPietrusky/alien-avatar-generator">Alien Avatar Generator</a></li>
          <li><a href="https://github.com/TimPietrusky/crystallo">crystallo - Responsive micro framework</a></li>
          <li><a href="https://github.com/TimPietrusky/pentizr">pentizr</a></li>
          <li><a href="https://github.com/TimPietrusky/codepen-awesomepi">unofficial CodePen API</a></li>
        </ul>
      </div>
     </section>
  </article>
  
<!-- I spend my online time chatting with the 4ae9b8 team -->
  <article data-high="2">
    <section data-cols="1" class="section--gamma">
      <div class="move--left">
        <h2>I spend my online time chatting with the 4ae9b8 team</h2>
      </div>
    </section>
     
     <section data-cols="1">
      <div>
        <h3>We found each other through CodePen</h3>
        <p>Hugo Giraudel, Mads Cordes (>:D), Sara Soueidan, Ana Tudor, Fabrice Weinberg & Joshua Hibbert. A really awesome group of people to spend the time with.</p>
        <p>I <span class="typicons-heart"></span> you guys!</p>
        
        <h3>We created Browserhacks</h3>
        <p>
         An extensive list of browser specific CSS and JavaScript hacks from all over the interwebs.
        </p>
        
        <ul class="list--alpha">
          <li><a href="http://browserhacks.com">browserhacks.com</a></li>
        </ul>
      </div>
     </section>
  </article>
  
<!-- I tried screencasting once or twice -->
  <article data-high="2">
    <section data-cols="1" class="section--delta">
      <div class="move--center">
        <h2>I tried screencasting once or twice</h2>
      </div>
    </section>
     
     <section data-cols="1">
      <div>
        <p>
          <iframe width="420" height="500" src="https://www.youtube.com/embed/39nVZsPP__E?rel=0" frameborder="0" allowfullscreen></iframe>
        </p>
        
        <ul class="list--alpha">
          <li><a href="https://www.youtube.com/watch?v=39nVZsPP__E">Convert a scribble to SVG</a></li>
        </ul>
      </div>
     </section>
  </article>
  
<!-- You can find me around the interwebs -->
  <article data-high="2">
    <section data-cols="1" class="section--zeta">
      <div class="move--left">
        <h2>You can find me around the interwebs</h2>
      </div>
    </section>
     
     <section data-cols="5">
      <div>
        <a href="https://twitter.com/TimPietrusky" target="_blank">
          <button class="section--zeta">Twitter</button>
        </a>
      </div>
      <div>
        <a href="https://codepen.io/TimPietrusky" target="_blank">
          <button class="section--zeta">CodePen</button>
        </a>
      </div>
      <div>
        <a href="https://github.com/TimPietrusky" target="_blank">
          <button class="section--zeta">GitHub</button>
        </a>
      </div>
      <div>
        <a href="https://soundcloud.com/timpietrusky/likes" target="_blank">
          <button class="section--zeta">SoundCloud</button>
        </a>
      </div>
      <div>
        <a href="http://dribbble.com/TimPietrusky" target="_blank">
          <button class="section--zeta">Dribbble</button>
        </a>
      </div>
       
     </section>
  </article>
  
<!-- Kudos Please -->
  <article data-high="2">
    <section data-cols="1" class="section--epsilon">
      <div class="move--center">
<div class="kudos" data-amount="0" data-url="codepen.io/TimPietrusky/pen/Kazcy"></div>
      </div>
    </section>
  </article>
</body>
              
            
!

CSS

              
                @import "compass/css3";

@import url(https://s.cdpn.io/1202/crystallo_compiled_1.css);
@import url(https://fonts.googleapis.com/css?family=Basic|Armata);
@import url(http://weloveiconfonts.com/api/?family=typicons);

@mixin breakpoint($point) {
  @if $point == papa-bear {
    @media (min-width: 67em) { @content; }
  }
  @if $point == mama-bear {
    @media (max-width: 66em) { @content; }
  }
  @if $point == baby-bear {
    @media (max-width: 44em) { @content; } 
  }
}

/* typicons */
[class*="typicons-"]:before,
*:before { 
  font-family: 'Typicons', sans-serif;
  font-size:1.5em;
  vertical-align:bottom;
}

/* vars */
$size-alpha: .45em;
$color-zeta: rgba(#ff66ef, .8);

/* Helper */
.move--left {
  text-align:left;
}

.move--right {
  text-align:right;
}

.move--center {
  text-align:center;
}

body {
  font: 1em/1.8em "Armata", sans-serif;
  color: #000;
  
  $color-helper-alpha: #c7c2d7;
  $color-helper-beta: #ecd6B2;
  $color-helper-gamma: #b2ac99;
  $color-helper-delta: #63cce3;
  
  @include background-image(
    linear-gradient(125deg, rgba($color-helper-alpha, .3) 0%, rgba($color-helper-beta, .3) 33%, rgba($color-helper-gamma, .3) 71%, rgba($color-helper-delta, .3) 95%),
    linear-gradient(-88deg, rgba($color-helper-alpha, .8) 0%, rgba($color-helper-beta, .3) 33%, rgba($color-helper-gamma, .7) 71%, rgba($color-helper-delta, .7) 95%),
    linear-gradient(23deg, rgba($color-helper-alpha, 1) 0%, rgba($color-helper-beta, .6) 33%, rgba($color-helper-gamma, 1) 71%, rgba($color-helper-delta, 1) 95%)
  );
}

a {
  text-decoration:none;
  padding-bottom:.25em;
  color:rgba(#888, .8); 
  @include transition(
    color .25s ease-in-out,
    border .25s ease-in-out
  );
  
  &:hover {
    color:#000;
    border-bottom-color:rgba(#000, .35);
  }
}

h1 {
  font:bold 4em "Basic", sans-serif;
  margin:0 0 .5em 0;
}

h2 {
  font-size:3em;
  line-height:1.75em;
  margin:0;
  color:#fff;
}

h3 {
  font: bold 2em "Armata", sans-serif;
}

img {
  margin:0;
  padding:0;
}

p {
  font-size:1.2em;
}

ul {
  margin:0;
  padding:0;
  
  li {
    margin:1.05em 0;
    line-height:1.25;
  }
  
  &.list--alpha {
    list-style-type:none;
    font-size:1.4em;
    
    li {
      &:before {
        content:')';
        color:rgba(#000, .5);
      }
        
      a {
        vertical-align:top;
      }
    }
    
    &.list--alpha__mod {
      li {
        &:before {
          content:'o';
        }
      }
    }
  }
}

article {
  padding:5em 0;
  
  @include breakpoint(baby-bear) {
    padding:.5em 0;
  }
  
  > section {
    background:#fff;
    box-shadow:0 0 0 $size-alpha rgba(#fff, .55);
    padding:1.5em 5em;
    
  @include breakpoint(baby-bear) {
    padding:.5em .75em;
  }
    
    &.section--alpha {
      background:rgba(#F38973, .8);
    }
    
    &.section--beta {
      background:rgba(#C18DBE, .8);
    }
    
    &.section--gamma {
      background:rgba(#F8BC76, .8);
    }
    
    &.section--delta {
      background:rgba(#8AD6D6, .8);
    }
    
    &.section--epsilon {
      background:rgba(#97CE68, .8);
    }
    
    &.section--zeta {
      background:$color-zeta;
    }
    
    &:first-child {
      padding-top:5em;
    }
      
    &:last-child {
      padding-bottom:5em;  
    }
  }
  
  &[data-high="1"] {
    margin-top:2em;
    background:rgba(#fff, .45);
    
    > section {
      padding:5em 0;
      
      @include breakpoint(baby-bear) {
        padding:2.5em .75em;
      }
      
      p {
        font-size:1.65em;
        line-height:1.85em;
        padding:.75em;
      }
      
      img {
        box-shadow:0 0 0 $size-alpha rgba(#ccc, .15);
      }
        
      div {
        padding: 0 .5em;
      }
    }
  }
  
  &[data-high="2"] {
    margin-top:2em;
    background:rgba(#fff, .45);
  }
}

/*
 * Buttons
 */
button {
  padding:1.5em .5em;
  font-size:1.5em;
  font-weight:bold;
  text-transform:uppercase;
  box-shadow:inset 0 0 0 $size-alpha rgba(#fff, 1);
  border:none;
  color:#fff;
  @include transition(
    color .25s ease-in-out,
    background .35s ease-in-out
  );
  
  &.section--zeta {
    background:$color-zeta;
      
    &:hover {
      color:#000;
      background:rgba($color-zeta, .5);
    }
  }
}

/*
 * Kudos
 */
$kudos_duration: 1.5s;
$kudos_duration_finish: .45s;
$kudos_width: 8em;
$kudos_height: 8em;
$kudos_color_alpha: #fff;
$kudos_color_beta: rgba(#ddd552, 1);

.kudos {
  font-size:2em;
  position:relative;
  max-width:$kudos_width;
  max-height:$kudos_height;
  margin:0 auto;
  background:$kudos_color_alpha;
  
  box-shadow:
    inset 0 0 0 .25em rgba(#ccc, .15),
    inset 0 0 0 $kudos_width / 3 $kudos_color_alpha,
    inset 0 0 0 $kudos_width rgba(#97CE68, .8)
  ; 
  line-height:$kudos_height; 
  text-align:center;
  @include transition(box-shadow $kudos_duration_finish / 2 ease-out);
  
  &:before {
    @include transition(font-size $kudos_duration_finish ease-in);
    font-size:0;
  }
  
  &.active {
    @include transition(box-shadow $kudos_duration linear);
    box-shadow:
      inset 0 0 0 .25em rgba(#ccc, .55),
      inset 0 0 0 0 $kudos_color_alpha,
      inset 0 0 0 .75em rgba($kudos_color_beta, .75),
      inset 0 0 0 $kudos_width $kudos_color_beta
    ;
      
    &:after {
       content: 'Don\'t move!';
    }
  }
  
  &.finish {
    @include transition(
      box-shadow $kudos_duration_finish linear,
      transform $kudos_duration_finish * 1.25 ease-in-out
    );
    box-shadow:
      inset 0 0 0 .25em rgba($kudos_color_beta, .5),
      inset 0 0 0 .5em $kudos_color_alpha,
      inset 0 0 0 .75em rgba($kudos_color_beta, .75),
      inset 0 0 0 1em $kudos_color_alpha,
      inset 0 0 0 0 $kudos_color_alpha,
      inset 0 0 0 $kudos_width $kudos_color_beta
    ;
    
    &:before {  
      font-size:2.25em;
      color:$kudos_color_alpha;
      line-height:$kudos_height / 2.125;
    }
  }
  
  &:after {
    position:absolute;
    content: attr(data-amount) ' Kudos';
    bottom:-1.25em;
    left:0;
    width:$kudos_width;
    text-align:center;
    line-height:1em;
    font-variant:small-caps;
  }
}
              
            
!

JS

              
                /**
  Kind of a "Tell us something about you"

  Facts about me. 

  # 2013 by Tim Pietrusky
  # timpietrusky.com
**/

KudosPlease=(function(){var a=document.documentElement.classList,p=!!a,e=function(r,q){return p?function(s,t){if(t!=""){return s.classList[r](t)}}:q},g=e("add",function(s,r){r=r.split(",");for(var q=0;q<r.length;q++){if(s.className.indexOf(r[q])==-1){s.className=s.className.trim()+" "+r[q]}}}),o=e("remove",function(s,r){r=r.split(",");for(var q=0;q<r.length;q++){s.className=s.className.replace(r[q],"").trim()}}),d=e("contains",function(u,t){var s=u.className.split(" "),q=false;for(var r=0;r<s.length;r++){if(s[r]==t){q=true}}return q}),h=function(q,r,s){if(s.status!=undefined){if(q.getAttribute("data-status")!=undefined){o(q,s.status[q.getAttribute("data-status")])}g(q,s.status[r]);q.setAttribute("data-status",r)}},n=function(q,s,r){g(q,"finish");h(q,"gamma",r);s=s||false;amount=l(parseInt(q.getAttribute("data-id"),10),r);if(s){++amount;b(q,"POST",r)}},j=function(r,q,t){var s=-1;if(!d(q,"finish")){g(q,"active");s=setTimeout(function(){o(q,"active");n(q,true,t)},t.duration);t.timer[q.getAttribute("data-id")]=s}},m=function(r,q,s){if(r.touches.length===1){r.stopPropagation();r.preventDefault();j(r,q,s)}},c=function(r,q,s){if(!d(q,"finish")){o(q,"active");clearTimeout(s.timer[q.getAttribute("data-id")])}},f=function(q,s,r,u){try{q.addEventListener(s,function(v){r(v,q,u)},false)}catch(t){q.attachEvent("on"+s,function(v){r(v,q,u)})}},i=function(r,q,s){if(s.persistent){window.localStorage.setItem("kudos:saved:"+r.getAttribute("data-url"),q)}},l=function(s,r){var q=r.elements[s].getAttribute("data-amount")||0;if(r.persistent){if((amount=window.localStorage.getItem("kudos:saved:"+r.elements[s].getAttribute("data-url")))!=undefined){q=amount}}return q},b=function(s,r,v){var u;try{u=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){u=new XMLHttpRequest()}u.onreadystatechange=function(){if(u.readyState==4&&u.status==200){var w=u.responseText;s.setAttribute("data-amount",w);if(r=="GET"){h(s,w==0?"alpha":"beta",v);if(v.persistent&&window.localStorage.getItem("kudos:saved:"+s.getAttribute("data-url"))!=null){h(s,"gamma",v)}}if(r=="POST"){i(s,w,v)}}};var q="?url="+encodeURIComponent(s.getAttribute("data-url"));u.open(r,"http://api.kudosplease.com/"+q,true);u.send()};function k(q){this.elements=document.querySelectorAll(q.el);this.status=q.status;this.persistent=q.persistent!=undefined?(q.persistent&&window.localStorage!=undefined):true;this.duration=q.duration;this.timer={};for(var r=0;r<this.elements.length;r++){var s=this.elements[r];s.setAttribute("data-id",r);b(s,"GET",this);if(l(r,this)==0){s.setAttribute("data-amount",0);this.timer[r]=-1;f(s,"touchstart",m,this);f(s,"touchend",c,this);f(s,"mouseover",j,this);f(s,"mouseout",c,this)}else{n(s,false,this)}}return this}"".trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});return k})();


function r(f){/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()}

r(function() {
  /*
   * Create Kudos Please widget
   */
  var kudosPlease = new KudosPlease({ 
    el : '.kudos',
    duration : 1500,
    status : {
      alpha: 'typicons-radar',
      beta: 'typicons-radar',
      gamma: 'typicons-brightness'
    }
  });
});
              
            
!
999px

Console