// sass-lint: disable-all
// -------------------------------------------------------------------
// :: CONVERT PX TO REM
// -------------------------------------------------------------------
// Important: rem-units are not supported on <IE9
// and we don't provide a fallback
//
// - http://caniuse.com/#search=rem

@function rem($_value) {
	@return #{$_value / 16px}rem;
}


// -------------------------------------------------------------------
// :: COVERT PX TO EM
// -------------------------------------------------------------------
// Em values are always relative to the parent element so
// you might need to provide context-value (eg. font-size
// of the parent element) to get the correct value
//
// - font-size: em(16px) => 1em
// - font-size: em(16px, 24px) => 0.666em

@function em($_value, $_context: 16px) {
	@return #{$_value / $_context}em;
}


// -------------------------------------------------------------------
// :: STRIP UNIT
// -------------------------------------------------------------------
// Strips a value from its unit

@function strip-unit($_value) {
	@return $_value / ($_value * 0 + 1);
}


// -------------------------------------------------------------------
// :: GET FONT
// -------------------------------------------------------------------

@mixin get-font($_name, $_url, $_weight: normal, $_style: normal) {

	@font-face {
		font-family: $_name;
		//src: url($_url +".eot"); // enable .eot support for <IE9
		src: url($_url + ".eot?#iefix") format("embedded-opentype"),
            //  url($_url +".woff2") format("woff2"),
		     url($_url + ".woff") format("woff"),
		     url($_url + ".ttf") format("truetype"),
		     url($_url + ".svg#icon") format("svg");
		font-weight: $_weight;
		font-style: $_style;
	}

}
