Remove trailing newline in minified output @media blocks

This commit is contained in:
jtm
2012-04-20 14:59:28 +00:00
parent b46f8c4ad0
commit 0bb5c7adfe
5 changed files with 12 additions and 19 deletions

View File

@@ -74,9 +74,11 @@ class Block(Node):
inner = ''.join([p.fmt(fills) for p in self.inner])
inner = inner.replace(fills['nl'],
fills['nl'] + fills['tab']).rstrip(fills['tab'])
if not fills['nl']:
inner = inner.strip()
fills.update({
'identifier': name,
'proplist': fills['tab'] + inner,
'proplist': fills['tab'] + inner
})
out.append(f % fills)
else:

View File

@@ -1,2 +1 @@
@media print{.mixin{color:red;}
}
@media print{.mixin{color:red;}}

View File

@@ -1,9 +1,6 @@
@-webkit-keyframes progress-bar-stripes{from{background-position:0 0;}
to{background-position:40px 0;}
}
to{background-position:40px 0;}}
@-moz-keyframes progress-bar-stripes{from{background-position:0 0;}
to{background-position:40px 0;}
}
to{background-position:40px 0;}}
@keyframes progress-bar-stripes{from{background-position:0 0;}
to{background-position:40px 0;}
}
to{background-position:40px 0;}}

View File

@@ -1,11 +1,7 @@
@media screen,projection{html{background:#fffef0;color:#330000;}
body{max-width:35em;margin:0 auto;}
}
body{max-width:35em;margin:0 auto;}}
@media print{.class{color:blue;}
.class .sub{width:42;}
.top,header>h1{color:#444444;}
}
@media screen{body{max-width:480;}
}
@media all and (orientation:portrait){aside{float:none;}
}
.top,header>h1{color:#444444;}}
@media screen{body{max-width:480;}}
@media all and (orientation:portrait){aside{float:none;}}

View File

@@ -8,5 +8,4 @@
.newlines{background:the,great,wall;border:2px solid black;}
.no_final_semi{color:white;}
.no_final_semi1{color:yellow;color:white;}
@media all{html{padding:src('no semi in media block');}
}
@media all{html{padding:src('no semi in media block');}}