Skip to content

Instantly share code, notes, and snippets.

@mcarneiro
Created February 5, 2015 17:11
Show Gist options
  • Save mcarneiro/e2cc4f3fc91d53e9382b to your computer and use it in GitHub Desktop.
Save mcarneiro/e2cc4f3fc91d53e9382b to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.1.0-beta)
// ----
.test-zero {
$var1: 0px;
$var2: 0;
content: "values should be false";
_1: ($var1 * $var2) > 0;
_2: ($var1 * $var2) / 1px > 0; // converting to unitless works
}
.test-return-inside-each {
$list: 1, 2, 3, 4;
@function each-wrong($val) {
@each $item in $list {
@if $item == $val {
@return nth($list, $item);
}
}
@return 0;
}
@function each-right($val) {
$ret: 0;
@each $item in $list {
@if $item == $val {
$ret: nth($list, $item);
}
}
@return $ret;
}
content: "values should be 1";
_1: each-wrong(1);
_2: each-right(1);
}
.color-calculation-sat {
content: "sat() should be 100% max";
$color: #0068b2;
$dinamic-color: adjust-color($color, $saturation: 10%);
_original-color: $color;
_dinamic-color: $dinamic-color;
_original-sat: saturation($color);
_dinamic-sat: saturation($dinamic-color);
}
.color-calculation-red {
content: "red() should be zero min";
$color: #0068b2;
$static-color: #0069bb;
$dinamic-color: adjust-color($color, $saturation: 10%);
_dinamic-color: $dinamic-color;
_static-color: $static-color;
_dinamic-red: red($dinamic-color);
_static-red: red($color);
}
.test-zero {
content: "values should be false";
_1: true;
_2: false; }
.test-return-inside-each {
content: "values should be 1";
_1: 1;
_2: 1; }
.color-calculation-sat {
content: "sat() should be 100% max";
_original-color: #0068b2;
_dinamic-color: #0069bb;
_original-sat: 100%;
_dinamic-sat: 110%; }
.color-calculation-red {
content: "red() should be zero min";
_dinamic-color: #0069bb;
_static-color: #0069bb;
_dinamic-red: -8.9;
_static-red: 0; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment