From 19354d99bc8def2358c41354c2b5f61f5c9925bd Mon Sep 17 00:00:00 2001 From: "Eevee (Alex Munroe)" Date: Thu, 28 Aug 2014 17:26:15 -0700 Subject: Fix rendering of nulls. --- scss/compiler.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scss/compiler.py b/scss/compiler.py index 9b29eb2..ab1c4ba 100644 --- a/scss/compiler.py +++ b/scss/compiler.py @@ -1782,16 +1782,18 @@ class Compilation(object): for i, (name, value) in enumerate(properties): if value is None: prop = name - elif value: + else: + if value.is_null: + continue value = value.render() # TODO compress or no + if not value: + # Don't render values that evaluate to nothing + # TODO when can this happen? + continue + if nl: value = (nl + tb + tb).join(self._textwrap(value)) prop = name + ':' + sp + value - else: - # Empty string means there's supposed to be a value but it - # evaluated to nothing; skip this - # TODO interacts poorly with last_prop_index - continue if i == last_prop_index: if sc: -- cgit v1.2.1