* Parse font-face.
()
| 465 | */ |
| 466 | |
| 467 | function atfontface() { |
| 468 | var pos = position(); |
| 469 | var m = match(/^@font-face\s*/); |
| 470 | if (!m) return; |
| 471 | |
| 472 | if (!open()) return error("@font-face missing '{'"); |
| 473 | var decls = comments(); |
| 474 | |
| 475 | // declarations |
| 476 | var decl; |
| 477 | while ((decl = declaration())) { |
| 478 | decls.push(decl); |
| 479 | decls = decls.concat(comments()); |
| 480 | } |
| 481 | |
| 482 | if (!close()) return error("@font-face missing '}'"); |
| 483 | |
| 484 | return pos({ |
| 485 | type: 'font-face', |
| 486 | declarations: decls, |
| 487 | }); |
| 488 | } |
| 489 | |
| 490 | /** |
| 491 | * Parse import |