Skip to content

Commit

Permalink
Only set CSS color properties when the specified value can be parsed
Browse files Browse the repository at this point in the history
bsweeney committed Jun 2, 2019
1 parent 6aca3b0 commit 5c20bb4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Css/Style.php
Original file line number Diff line number Diff line change
@@ -1934,11 +1934,10 @@ protected function set_prop_color($prop, $color)
$munged_color = $this->munge_color($color);

if (is_null($munged_color)) {
$this->_props_computed[$prop] = "inherit";
return;
}

$this->_props_computed[$prop] = is_array($munged_color) ? $munged_color["hex"] : $munged_color;
$this->_props_computed[$prop] = (is_array($munged_color) ? $munged_color["hex"] : $munged_color);
}

/**

0 comments on commit 5c20bb4

Please sign in to comment.