MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / atfontface

Function atfontface

packages/core/css/lib/parse/index.ts:467–488  ·  view source on GitHub ↗

* Parse font-face.

()

Source from the content-addressed store, hash-verified

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

Callers 1

atruleFunction · 0.85

Calls 9

openFunction · 0.85
commentsFunction · 0.85
declarationFunction · 0.85
closeFunction · 0.85
concatMethod · 0.80
positionFunction · 0.70
matchFunction · 0.70
errorFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected