Simple Sass function

Simple example of a function in Scss

@function fluidize($target, $context) {
	@return ($target / $context) * 100%;
}
.sidebar {
	width: fluidize(350px, 1000px);  //returns 35%
}

Add your comment