diff --git a/lib/compress.js b/lib/compress.js index 601bd73..0837e24 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ @@ -144,6 +143,17 @@ Compiler.prototype.page = function(node){ + this.emit('}'); }; +/** + * Visit font-face node. + */ + +Compiler.prototype.fontface = function(node){ + return this.emit('@font-face ') + + this.emit('{') + + this.mapVisit(node.declarations) + + this.emit('}'); +}; + /** * Visit rule node. */ diff --git a/lib/identity.js b/lib/identity.js index cc9fd5c..47af488 100644 --- a/lib/identity.js +++ b/lib/identity.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ @@ -174,6 +173,22 @@ Compiler.prototype.page = function(node){ + this.emit('\n}'); }; +/** + * Visit font-face node. + */ + +Compiler.prototype.fontface = function(node){ + var decls = node.declarations; + if (!decls.length) return ''; + + return this.emit('@font-face ') + + this.emit('{\n') + + this.emit(this.indent(1)) + + this.mapVisit(decls, '\n') + + this.emit(this.indent(-1)) + + this.emit('\n}'); +}; + /** * Visit rule node. */