summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEevee (Alex Munroe) <eevee.git@veekun.com>2014-08-28 17:26:15 -0700
committerEevee (Alex Munroe) <eevee.git@veekun.com>2014-09-01 21:30:57 -0700
commit19354d99bc8def2358c41354c2b5f61f5c9925bd (patch)
treeba486e975c86ff6fb05f1353c5b5b9c7f63257d1
parent76ac2d42c3ed3d4ffffa4695b4d44dd5968b72a9 (diff)
downloadpyscss-19354d99bc8def2358c41354c2b5f61f5c9925bd.tar.gz
Fix rendering of nulls.
-rw-r--r--scss/compiler.py14
1 files 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: