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

Function atpage

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

* Parse paged media.

()

Source from the content-addressed store, hash-verified

409 */
410
411 function atpage() {
412 var pos = position();
413 var m = match(/^@page */);
414 if (!m) return;
415
416 var sel = selector() || [];
417
418 if (!open()) return error("@page missing '{'");
419 var decls = comments();
420
421 // declarations
422 var decl;
423 while ((decl = declaration())) {
424 decls.push(decl);
425 decls = decls.concat(comments());
426 }
427
428 if (!close()) return error("@page missing '}'");
429
430 return pos({
431 type: 'page',
432 selectors: sel,
433 declarations: decls,
434 });
435 }
436
437 /**
438 * Parse document.

Callers 1

atruleFunction · 0.85

Calls 10

selectorFunction · 0.85
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