|
|
@ -20,7 +20,7 @@ const at_rule_has_declaration = ({ block }: Node): true =>
|
|
|
|
function minify_declarations(
|
|
|
|
function minify_declarations(
|
|
|
|
code: MagicString,
|
|
|
|
code: MagicString,
|
|
|
|
start: number,
|
|
|
|
start: number,
|
|
|
|
declarations: Array<Declaration>
|
|
|
|
declarations: Declaration[]
|
|
|
|
): number {
|
|
|
|
): number {
|
|
|
|
let c = start;
|
|
|
|
let c = start;
|
|
|
|
|
|
|
|
|
|
|
@ -89,7 +89,7 @@ class Rule {
|
|
|
|
code.remove(c, this.node.block.start);
|
|
|
|
code.remove(c, this.node.block.start);
|
|
|
|
|
|
|
|
|
|
|
|
c = this.node.block.start + 1;
|
|
|
|
c = this.node.block.start + 1;
|
|
|
|
c = minify_declarations(code, c, this.declarations)
|
|
|
|
c = minify_declarations(code, c, this.declarations);
|
|
|
|
|
|
|
|
|
|
|
|
code.remove(c, this.node.block.end - 1);
|
|
|
|
code.remove(c, this.node.block.end - 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -157,7 +157,7 @@ class Declaration {
|
|
|
|
class Atrule {
|
|
|
|
class Atrule {
|
|
|
|
node: Node;
|
|
|
|
node: Node;
|
|
|
|
children: Array<Atrule|Rule>;
|
|
|
|
children: Array<Atrule|Rule>;
|
|
|
|
declarations: Array<Declaration>;
|
|
|
|
declarations: Declaration[];
|
|
|
|
|
|
|
|
|
|
|
|
constructor(node: Node) {
|
|
|
|
constructor(node: Node) {
|
|
|
|
this.node = node;
|
|
|
|
this.node = node;
|
|
|
|