123

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <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>
            
          
!
            
              @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);
  }
}
            
          
!
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.

Console