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

Function atmedia

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

* Parse media.

()

Source from the content-addressed store, hash-verified

369 */
370
371 function atmedia() {
372 var pos = position();
373 var m = match(/^@media *([^{]+)/);
374
375 if (!m) return;
376 var media = trim(m[1]);
377
378 if (!open()) return error("@media missing '{'");
379
380 var style = comments().concat(rules());
381
382 if (!close()) return error("@media missing '}'");
383
384 return pos({
385 type: 'media',
386 media: media,
387 rules: style,
388 });
389 }
390
391 /**
392 * Parse custom-media.

Callers 1

atruleFunction · 0.85

Calls 9

trimFunction · 0.85
openFunction · 0.85
commentsFunction · 0.85
rulesFunction · 0.85
closeFunction · 0.85
concatMethod · 0.80
positionFunction · 0.70
matchFunction · 0.70
errorFunction · 0.70

Tested by

no test coverage detected