Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scss.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1868,7 +1868,7 @@ public function toRGB($hue, $saturation, $lightness) {
protected static $lib_if = array("condition", "if-true", "if-false");
protected function lib_if($args) {
list($cond,$t, $f) = $args;
if ($cond == self::$false) return $f;
if (!$this->isTruthy($cond)) return $f;
return $t;
}

Expand Down
8 changes: 8 additions & 0 deletions tests/inputs/if_on_null.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@function testfunc($pseudo: null) {
$output: if($pseudo, "green", "red");
@return $output;
}

body {
background-color: testfunc();
}
2 changes: 2 additions & 0 deletions tests/outputs/if_on_null.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
body {
background-color: "red"; }