Skip to content

Instantly share code, notes, and snippets.

@douglasdeodato
Last active July 12, 2016 11:23
Show Gist options
  • Save douglasdeodato/189c0d1ef54bcebd0c9da2204e690466 to your computer and use it in GitHub Desktop.
Save douglasdeodato/189c0d1ef54bcebd0c9da2204e690466 to your computer and use it in GitHub Desktop.
sass arithmetic functions
.testing {
width: 20px;
}
.arithmetic-functions {
division: 1;
multiply: 100;
decrease: 0;
add: 20;
}
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
$test: 10px;
@function calc-width($value1, $value2) {
@return $value1 + $value2;
}
.testing {
width: calc-width($test, $test);
}
$number10: 10;
.arithmetic-functions {
division: $number10/$number10;
multiply: $number10*$number10;
decrease: $number10 - $number10;
add: $number10+$number10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment