Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


The black color is incorrectly parsed with !default #71

pgergo opened this Issue · 1 comment

2 participants


I had a line

$text_color: black !default;

But even if this variable was defined nowhere else, when using it, it is substituted to an empty string.

Turns out that during parsing the $text_color variable was incorrectly assigned the value '!default'. When _get_properties processes the value (python variable), which is a ListValue in this case, it iterates over the k, v pairs of its dictionary. Every v is compared to the string '!default', but surprisingly the equality ColorValue('black') == '!default' holds, and afterwards everything is screwed up.

This is because the comparison operator of ColorValue tries to convert the other operand to a ColorValue, and the string '!default' flawlessly converts to black! Checking the ColorValue constructor shows that there an unhandled case, after realizing that the color type is neither 'rgb', 'rgba', 'hsl', 'hsla', an exception should be thrown instead of returning silently while the instance is uninitialized, and later treated as black.

With this fix it seems to work OK.


I believe this is fixed by my recent change to how !default is parsed; it's now stripped out as early as possible. If you're still around, please try out the development branch.

@eevee eevee closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.