Commit 8fea1a6a authored by peterlundberg's avatar peterlundberg

Fix so compress css includes all css if COMPRESS_PRECOMPILERS is used and COMPRESS_ENABLED is false

parent f752c7bc
......@@ -30,9 +30,10 @@ class CssCompressor(Compressor):
if data:
self.split_content.append(data)
media = elem_attribs.get('media', None)
# Append to the previous node if it had the same media type,
# otherwise create a new node.
if self.media_nodes and self.media_nodes[-1][0] == media:
# Append to the previous node if it had the same media type
append_to_previous = self.media_nodes and self.media_nodes[-1][0] == media
# and we are not just precompiling, otherwise create a new node.
if append_to_previous and settings.COMPRESS_ENABLED:
self.media_nodes[-1][1].split_content.append(data)
else:
node = CssCompressor(content=self.parser.elem_str(elem),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment