Skip to content

Commit 93f68c8

Browse files
Added @font-face support
1 parent fbfce1f commit 93f68c8

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

lib/identity.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/**
32
* Module dependencies.
43
*/
@@ -174,6 +173,22 @@ Compiler.prototype.page = function(node){
174173
+ this.emit('\n}');
175174
};
176175

176+
/**
177+
* Visit font-face node.
178+
*/
179+
180+
Compiler.prototype.fontface = function(node){
181+
var decls = node.declarations;
182+
if (!decls.length) return '';
183+
184+
return this.emit('@font-face ')
185+
+ this.emit('{\n')
186+
+ this.emit(this.indent(1))
187+
+ this.mapVisit(decls, '\n')
188+
+ this.emit(this.indent(-1))
189+
+ this.emit('\n}');
190+
};
191+
177192
/**
178193
* Visit rule node.
179194
*/

0 commit comments

Comments
 (0)