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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <div class="container">
  <h1>SCSS Icons</h1>
  <p>An icon a day keeps the Ux guy away</p>
  <ul>
		<li><i class="icon--stop"></i></li>
		<li><i class="icon--pause"></i></li>
		<li><i class="icon--play"></i></li>
	</ul>
  <ul>
		<li><i class="icon--rewind"></i></li>
		<li><i class="icon--previous"></i></li>
		<li><i class="icon--next"></i></li>
		<li><i class="icon--fastforward"></i></li>
	</ul>
	<hr>
	<ul>
    <li><i class="icon--check"></i></li>
		<li><i class="icon--cancel"></i></li>
		<li><i class="icon--add"></i></li>
	</ul>
	<ul>
		<li><i class="icon--minus"></i></li>
		<li><i class="icon--divide"></i></li>
  </ul>
	<hr>
	<ul>
		<li><i class="icon--search"></i></li>
		<li><i class="icon--calendar"></i></li>
		<li><i class="icon--mail"></i></li>
	</ul>
	<ul>
		<li><i class="icon--creditcard"></i></li>
		<li><i class="icon--home"></i></li>
		<li><i class="icon--mothership"></i></li>
		<li><i class="icon--download"></i></li>
	</ul>
</div>
            
          
!
            
              /* Fonts */
@import 'https://fonts.googleapis.com/css?family=Gravitas+One';
$headline-font: 'Gravitas One', serif;
$body-font: Helvetica, arial, san-serif;
$font-size: 1em;

/* Colors */
$white: #fff;
$gray: #333;
$light-gray: lighten($gray, 68%);
$accent: tomato;

/* Mixins */
@mixin borderRadius($radius){
	-webkit-border-radius: $radius;
	border-radius: $radius;
}
@mixin transform($transform){
    -moz-transform: $transform;
    -webkit-transform: $transform;
    -o-transform: $transform;
    -ms-transform: $transform;
    transform: $transform;
}

/* Page styles */
html{
  text-align:center;
  font-size: $font-size;
  background: $gray;
	font-family: $body-font;
}

.container{
  $border-radius: 10px;
  width: 100%;
  max-width: 20em;
  margin: 6em auto;
  padding: $border-radius;
  overflow: hidden;
  background-color: $light-gray;
  border-radius: $border-radius;
  border: 5px solid white;
  min-height: 20em;
  -webkit-box-shadow: 0 0 80px 0 rgba(0,0,0,0.5);
  box-shadow: 0 0 80px 0 rgba(0,0,0,0.5);
  h1{
    font-family: $headline-font;
    font-size: 3em;
    width: 100%;
    background-color:white;
    color: $accent;
    margin:0;
    border-top-left-radius:$border-radius /1.2;
    border-top-right-radius:$border-radius /1.2;
  }
	hr{
		border-style: groove;
		border-bottom: 1px solid $white;
		width: 80%;
	}
  ul{
		padding: 0;
    li{
      list-style:none;
      display:inline-block;
			positon: relative;
      padding: 0.3em;
      font-size: $font-size;
    }
  }
}

/*
 * Icons scss
 * 
 * * usage ex: 
 * * <i class="icon--search"></i>
 */

// set variables
$icon-size: $font-size/2; // make it the size of your font. 
$icon-color: $accent; // default color for your icon system

// common shapes
@mixin circle{
	background: $white;
	color: $accent;
	@include borderRadius(100%);
	height: $icon-size*5;
	width: $icon-size*5;
	border: $icon-size solid $icon-color;
}
@mixin triangle{
	$triangle-size: $icon-size*1.6;
	width: 0; 
	height: 0;
	border-top: $triangle-size solid transparent;
	border-bottom: $triangle-size solid transparent;
	border-left: $triangle-size*1.5 solid $icon-color;
}
@mixin bar{
	background-color: $icon-color;
	height: $icon-size*3;
	width: $icon-size;
}

i{
	font-style: normal;
	display: inline-block;
	position: relative;
	color: $icon-color;
	font-size: $font-size;
	&:before, &:after{
		content:'';
		position: absolute;
	}
}

//actual icons
.icon{
	
	&--play{
		@include circle;
		&:before{
			@include triangle;
			top: 20%;
			left: 32%;
		}
	}
	
	&--fastforward, &--rewind{
		@include circle;
		&:before{
			@include triangle;
			top: 20%;
			left: 25%;
		}
		&:after{
			@include triangle;
			top: 20%;
			left: 45%;
		}
	}
	&--rewind{ @include transform(rotate(180deg)); }
	
	&--stop{
		@include circle;
		&:before{
			height: $icon-size*2.5;
			width: $icon-size*2.5;
			top:25%;
			left:25%;
			background-color: $icon-color;
		}
	}
	
	&--pause{
		@include circle;
		&:before, &:after{
			@include bar;
			top:20%;
		}
		&:before{
			left:25%;
		}
		&:after{
			right:25%;
		}
	}
	
	&--previous, &--next{
			@include circle;
			&:before{
				top:20%;
				left:25%;
			}
			&:after{
				top:20%;
				right:25%;
			}
	}
	&--previous{
		&:before{ @include bar; }
		&:after{
			@include triangle;
			transform: scaleX(-1);
		}
	}
	&--next{
		&:before{ @include triangle; }
		&:after{ @include bar; }
	}

	
/*
 * simple icons
 */
	
	&--check{
    @include circle;
		&:before{
			@include bar;
			top: 20%;
			left: 45%;
			@include transform(rotate(45deg));
		}
	  &:after{
			@include bar;
			height: $icon-size*1.5;
			@include transform(rotate(-45deg));
			top: 45%;
			left: 25%;
		}
	}
	
	&--cancel{
    @include circle;
		&:before{
			content: '\00D7';
			font-size: $icon-size*5;
			font-weight:bold;
			top: -15%;
			left: 21%;
		}
	}
	
	&--add{
    @include circle;
		&:before{
			content: '+';
			font-size: $icon-size*5;
			font-weight:bold;
			top: -15%;
			left: 20%;
		}
	}
	
	&--minus, &--divide{
    @include circle;
		&:before{
			@include bar;
			@include transform(rotate(90deg));
			top:20%;
			left:40%;
		}
	}
	&--divide{
		&:after{
			width: $icon-size;
			height: $icon-size;
			box-shadow: inset 0 0 0 $icon-size*2,$icon-size*2.5 0;
			@include transform(rotate(90deg));
			@include borderRadius(100%);
			top: 15%;
			left: 40%;
		}
	}

/*
 * Non-circle, more complex icons
 */
	&--search {
    @include circle;
		border-width: $icon-size/1.1;
		vertical-align: $icon-size;
		height: $icon-size*3;
		width: $icon-size*3;
		&:after {
			@include bar;
			background: $icon-color;
			top: $icon-size*2.2;
			left: $icon-size*3.2;
			@include transform(rotate(-45deg));
		}
	}

	&--calendar{
		$cal-size:$icon-size*1.2; // makes it easier to adjust.
		height: $cal-size*3;
		width: $cal-size*4;
		border: $cal-size/2 solid $icon-color;
		border-width: $cal-size $cal-size/2 $icon-size/2;
		background: $white;
		@include borderRadius(10%);
		&:before{
			top: 12%;
			left: 7%;
			width: $cal-size/1.06;
			height: $cal-size/1.06;
			$bs-small-num: $cal-size*1.25;
			$bs-large-num: $bs-small-num*2;
			box-shadow: inset 0 0 0 $bs-small-num,
				$bs-small-num 0,
				$bs-large-num 0,
				0 $bs-small-num,
				$bs-small-num $bs-small-num,
				$bs-large-num $bs-small-num;
		}
		&:after{
			width: $cal-size;
			height: $cal-size;
			box-shadow: inset 0 0 0 $cal-size*2,$cal-size*2.5 0;
			top: -50%;
    	left: 5%;
		} 
	}

	&--mail{
		height: $icon-size*4;
		width: $icon-size*6;
		border: $icon-size/2 solid $icon-color;
		background: $white;
		@include borderRadius(10%);
		overflow:hidden;
		&:before, &:after{
			height: $icon-size*4;
			width: $icon-size*4;
			border: $icon-size/2 solid $icon-color;
			background: $white;
			@include borderRadius(10%);
			@include transform(rotate(45deg));
			left: 9%;
		}
		&:before{
			top: 50%;
		}
		&:after{
			top: -70%;
		}
	}

	&--creditcard{
		height: $icon-size*4;
		width: $icon-size*6;
		border: $icon-size/2 solid $icon-color;
		background: $white;
		@include borderRadius(10%);
		overflow:hidden;
		&:before{
			border: $icon-size/2 solid $icon-color;
			width: 100%;
			top: 60%;
			left: 0;
		}
		&:after{
			border: $icon-size/4 solid $icon-color;
			width: 10%;
			top: 35%;
			right: 10%;
		}
	}
	
	&--home{
		height: $icon-size*4;
		width: $icon-size*4.5;
		background-color: $white;
		border-left: $icon-color $icon-size/1.2 solid;
		border-right: $icon-color $icon-size/1.2 solid;
		border-bottom: $icon-color $icon-size/1.2 solid;
		@include borderRadius(10%);
		&:before{
			$triangle-size: $icon-size*4;
			content: '';
			width: 0; 
			height: 0;
			border-top: $triangle-size solid transparent;
			border-bottom: $triangle-size/1.5 solid $icon-color;
			border-left: $triangle-size solid transparent;
			border-right: $triangle-size solid transparent;
			@include borderRadius(10%);
			top: -150%;
			left: -40%;
		}
		&:after{
			height: $icon-size*2;
			width: $icon-size;
			background: $icon-color;
			@include borderRadius(25%);
			top: 55%;
			left: 40%;
		}
	}
	
	&--mothership{
		vertical-align: $icon-size;
		height: $icon-size*3;
		width: $icon-size*5;
		background-color: $white;
		border-left: $icon-color $icon-size*1.5 solid;
		border-bottom: $icon-color $icon-size*1.5 solid;
		border-right: $icon-color $icon-size*1.5 solid;
		@include borderRadius(100%);
		
		&:after{
			height: $icon-size*2;
			width: $icon-size;
			background: $icon-color;
			@include borderRadius(100%);
			top: 50%;
			left: 40%;
		}
	}
	&--download{
		height: $icon-size*4;
		width: $icon-size*4;
		border: $icon-size/2 solid $icon-color;
		background: $white;
		@include borderRadius(10%);
		&:before{
			z-index: 3;
			height: 13px;
			width: 13px;
			border: $icon-size/2 solid $icon-color;
			border-top: 0 solid transparent;
			border-left: 0 solid transparent;
			background: transparent;
			@include borderRadius(10%);
			@include transform(rotate(45deg));
			left: 50%;
			top: 50%;
			transform: translate(-50%, -50%) rotate(45deg);
		}
		&:after{
			background-color: $icon-color;
			height: 20px;
			width: 4px;
			border: 2px solid $white;
			postion: absolute;
			top: calc(50% - 14px);
			left: calc(50% - 4px);
			z-index: 2;
		}
	}
}
            
          
!
999px
Loading ..................

Console