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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <i class="icon icon_hamburger"></i>

<i class="icon icon_mail"></i>

<i class="icon icon_heart"></i>

<i class="icon icon_home"></i>

<i class="icon icon_camera"></i>

<i class="icon icon_chart"></i>

<i class="icon icon_search"></i>
              
            
!

CSS

              
                @import "compass/css3";

body {  margin: 30px; }

.icon {
  position: relative;
  display: block;
  float: left;
  margin: .625em;
  
  &::before,
  &::after {
    content: "";
    position: absolute;
  }
}

// Hamburger
.icon_hamburger {
  width: 1.625em;
  height: .313em;
  background: black;
  margin-top: 20px;
  
  &::before {
    position: absolute;
    top: -.625em;
    width: 1.625em;
    height: .313em;
    background: black;
  }
  
  &::after {
    position: absolute;
    bottom: -.625em;
    width: 1.625em;
    height: .313em;
    background: black;
  }
}

// Mail
.icon_mail {
  border-top: 1.063em solid transparent;
  border-right: 1.25em solid black;
  border-bottom: .5em solid black;
  border-left: 1.25em solid black;
  
  &::before {
    top: -1.25em;
    left: -1.25em;
    border-top: 1.063em solid black;
    border-right: 1.25em solid transparent;
    border-left: 1.25em solid transparent;
  }
}

// Heart
.icon_heart {
  margin-top: .5em;
  
  &::before {
    width: 1em;
    height: 1.563em;
    background: black;
    @include rotate(135deg);
    @include border-bottom-radius(.5em);
  }
  
  &::after {
    width: 1em;
    height: 1.563em;
    background: black;
    left: .375em;
    @include rotate(45deg);
    @include border-top-radius(.5em);
  }
}

// Home
.icon_home {
  border-bottom: .938em solid black;
  border-left: .938em solid transparent;
  border-right: .938em solid transparent;
  margin-left: 1.875em;
  
  &::before {
    width: .563em;
    height: .625em;
    background: black;
    margin: .938em 0 0 -.688em;
  }
  
  &::after {
    width: .563em;
    height: .625em;
    background: black;
    margin: .938em 0 0 .125em;
  }
}

// Camera
.icon_camera {
  width: 1.938em;
  height: 1.375em;
  margin-top: .813em;
  background: black;
  @include border-radius(.125em);
  
  &::before {
    margin: -.313em 0 0 .313em;
    border-bottom: .313em solid black;
	  border-left: .188em solid transparent;
	  border-right: .188em solid transparent;
	  height: 0;
	  width: .938em;
  }
  
  &::after {
    width: .438em;
    height: .438em;
    border: .25em solid white;
    @include border-radius(.438em);
    margin: .125em 0 0 .5em;
  }
}

// Chart
.icon_chart {
  width: .375em;
  height: 1.125em;
  background: black;
  margin: 1.063em .938em 0 .938em;
  
  &::before {
    width: .375em;
    height: .563em;
    background: black;
    margin-left: -.563em;
    bottom: 0;
  }
  
  &::after {
    width: .375em;
    height: 1.563em;
    background: black;
    margin-left: .563em;
    bottom: 0;
  }
}

// Search
.icon_search {
  width: .75em;
  height: .75em;
  background: white;
  border: .25em solid black;
  margin-left: .938em;
  @include border-radius(.625em);
  
  &::before {
    width: .25em;
    height: .875em;
    margin: .5em 0 0 -.375em;
    background: black;
    @include rotate(45deg);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console