@font-face {
	font-family: "Icons";
	src: url('../fonts/Icons.eot');
	src: url('../fonts/Icons.eot?#iefix') format('eot'),
		url('../fonts/Icons.woff2') format('woff2'),
		url('../fonts/Icons.woff') format('woff'),
		url('../fonts/Icons.ttf') format('truetype'),
		url('../fonts/Icons.svg#Icons') format('svg');
}

@mixin custom-icon-styles {
	font-family: "Icons";
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
	// speak: none; // only necessary if not using the private unicode range (firstGlyph option)
	text-decoration: none;
	text-transform: none;
}

%custom-icon {
	@include custom-icon-styles;
}

@function custom-icon-char($filename) {
	$char: "";

	@if $filename == github {
		$char: "\E001";
	}
	@if $filename == git {
		$char: "\E001";
	}
	@if $filename == twitter {
		$char: "\E002";
	}

	@return $char;
}

@mixin custom-icon($filename, $insert: before, $extend: true) {
	&:#{$insert} {
		@if $extend {
			@extend %custom-icon;
		} @else {
			@include custom-icon-styles;
		}
		content: custom-icon-char($filename);
	}
}

.custom-icon-github {
	@include custom-icon(github);
}
.custom-icon-git {
	@include custom-icon(github);
}
.custom-icon-twitter {
	@include custom-icon(twitter);
}
