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="controls">
  <a href="#">View Guides</a>
</div>

<div class="showcase hide">
  <div class="infos">
  <div>
    <p>Georgia <strong>84pt</strong></p> 
  </div>
  <div>
    <p>Ascending lines</p>
  </div>
  <div>
    <p>Descending lines</p>
  </div>
  <div>
    <p>Capitals Height</p>
  </div>
  <div>
    <p>X Height(also called eye)</p>
  </div>
  <div>
    <p>Baseline (or foot line)</p>
  </div>
</div>
  <p>
    Typography
  </p>
</div>



              
            
!

CSS

              
                @import "bourbon";

$c-1:#eff0f2;
$c-2:#FC880F;
$c-3:#49E845 ;
$c-4:#FF4351;
$c-5:#1B9AF7 ;
$c-6:#333;
$square:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAASElEQVQYV2P8/9L6/wf27Qz4gMBPTwbG9x8+/QcxcCmGyYEVgkzDphhZDK4QXTG6RhSFMMUgGt0p5ClEtg6n1UR5hqjgITbAAT0lVM9R+wTWAAAAAElFTkSuQmCC";
@mixin reset {
  width:100%;
  height:100%;
  margin:0;
  padding:0;
}
@mixin high{
  -webkit-font-smoothing:antialiased;
  @include box-sizing(border-box);
  font-weight:300; 
  line-height:24px;
  letter-spacing:.02em;
}
*{  
  @include high();
}
html,body{
  @include reset();
}

body{
  font-family:helvetica,sans serif;
  background:$c-1;
}

#controls{
  position:absolute;
  width:30em;
  height:1em;
  left:0;right:0;
  margin:auto;
  top:1em;
  a{
    position: relative;
    display: inline-block;
    padding: 10px 15px; 
    margin: 2em 0 2em;
    border-radius: 3px;
    font: 400 12px/1.2em sans-serif;
    letter-spacing: 1px;
    text-decoration: none;
    color: $c-6;
    @include transition(background .4s);
    border: 2px solid $c-6;
    &:hover {
      background: $c-6;
      color: $c-1;
    }
  } 
}
.showcase{
  width:30em;
  height:2.6em; 
  margin:35vh auto;
  background:url($square) repeat; 
  @include transition(background .4s ease);
  &:before,&:after{
    content:'';
    display:block;
    position:absolute;
    z-index:0;  
    @include transition(background .4s ease .4s);
  }
  &:before{
    width:30em;
    height:.1em;
    background:$c-2;
    margin-top:-1.4em;
    @include transition(background .4s ease .8s);
  }
  
  &:after{
    width:30em;
    height:.08em;
    background:$c-3;
    margin-top:-3.05em;
    @include transition(background .4s ease 1.2s);
  }
  
  
  p{
    font-size:5.250em;
    font-family:Georgia;
    position:relative;
    z-index:9999; 
    &:before,&:after{
      content:'';
      display:block;
      position:absolute;
      z-index:-1;   
    }
    &:before{
      width:5.72em; 
      height:.02em;
      background:$c-4;
      margin-top:.48em; 
    } 
    &:after{
      width:5.72em; 
      height:.02em;
      background:$c-5;
      margin-top:-0.285em; 
    }
    
  }
  .infos{
    @include transition(visibility .3s ease 1.5s);
    p{
      font-family:helvetica; 
      font-size:.9em;
      width:12em;
      strong{font-weight:600}
      &:before,&:after{
        background:transparent;
        width:0;
        height:0;
      }
    }
    position:absolute;
    div{
      &:nth-child(1){
        position:absolute;
        margin:-4em 0em;
        @include transition(visibility .3s ease );
      } 
      
      &:nth-child(2){
        position:absolute;
        margin:-4em 22.8em;
        @include transition(visibility .3s ease .3s);
      } 
      &:nth-child(3){
        position:absolute;
        margin:3em 22.2em;
        @include transition(visibility .3s ease .6s);
      }  
      
      &:nth-child(4){
        position:absolute;
        margin:-2em 30.5em;
        @include transition(visibility .3s ease .9s);
      }  
      
      &:nth-child(5){
        position:absolute;
        margin:-.5em 30.5em;
        @include transition(visibility .3s ease 1.2s);
        p{
          &:first-letter{font-weight:bold;}
        }
      }  
      &:nth-child(6){
        position:absolute;
        margin:1em 30.5em;
        @include transition(visibility .3s ease 1.5s);
      }  
    }
  }
  &.hide{
    background:transparent;
    p{
      &:before,&:after{
        background:transparent;
      }
    }
    &:before,&:after{
      background:transparent;
    }
    .infos{visibility:hidden;
      p{
      }
    }
  }
}
              
            
!

JS

              
                $(document).ready(function(){
  $('#controls a').on('click',function(e){
    e.preventDefault();
    $('.showcase').toggleClass('hide');
    var $this = $(this); 
    if( $this.text() == 'View Guides'){ 
      $this.empty().append('Remove Guides'); 
    } else { 
      $this.empty().append('View Guides'); 
    }
  });
});


              
            
!
999px

Console