@@ -651,8 +651,6 @@ abstract class StylesheetParser extends Parser {
651
651
return mediaRule (start);
652
652
case "mixin" :
653
653
return _mixinRule (start);
654
- case "-moz-document" :
655
- return mozDocumentRule (start, name);
656
654
case "return" :
657
655
return _disallowedAtRule (start);
658
656
case "supports" :
@@ -1345,91 +1343,6 @@ abstract class StylesheetParser extends Parser {
1345
1343
});
1346
1344
}
1347
1345
1348
- /// Consumes a `@moz-document` rule.
1349
- ///
1350
- /// Gecko's `@-moz-document` diverges from [the specification][] allows the
1351
- /// `url-prefix` and `domain` functions to omit quotation marks, contrary to
1352
- /// the standard.
1353
- ///
1354
- /// [the specification] : http://www.w3.org/TR/css3-conditional/
1355
- @protected
1356
- AtRule mozDocumentRule (LineScannerState start, Interpolation name) {
1357
- var valueStart = scanner.state;
1358
- var buffer = InterpolationBuffer ();
1359
- var needsDeprecationWarning = false ;
1360
- while (true ) {
1361
- if (scanner.peekChar () == $hash) {
1362
- var (expression, span) = singleInterpolation ();
1363
- buffer.add (expression, span);
1364
- needsDeprecationWarning = true ;
1365
- } else {
1366
- var identifierStart = scanner.state;
1367
- var identifier = this .identifier ();
1368
- switch (identifier) {
1369
- case "url" || "url-prefix" || "domain" :
1370
- if (_tryUrlContents (identifierStart, name: identifier)
1371
- case var contents? ) {
1372
- buffer.addInterpolation (contents);
1373
- } else {
1374
- scanner.expectChar ($lparen);
1375
- whitespace ();
1376
- var argument = interpolatedString ();
1377
- scanner.expectChar ($rparen);
1378
-
1379
- buffer
1380
- ..write (identifier)
1381
- ..writeCharCode ($lparen)
1382
- ..addInterpolation (argument.asInterpolation ())
1383
- ..writeCharCode ($rparen);
1384
- }
1385
-
1386
- // A url-prefix with no argument, or with an empty string as an
1387
- // argument, is not (yet) deprecated.
1388
- var trailing = buffer.trailingString;
1389
- if (! trailing.endsWith ("url-prefix()" ) &&
1390
- ! trailing.endsWith ("url-prefix('')" ) &&
1391
- ! trailing.endsWith ('url-prefix("")' )) {
1392
- needsDeprecationWarning = true ;
1393
- }
1394
-
1395
- case "regexp" :
1396
- buffer.write ("regexp(" );
1397
- scanner.expectChar ($lparen);
1398
- buffer.addInterpolation (interpolatedString ().asInterpolation ());
1399
- scanner.expectChar ($rparen);
1400
- buffer.writeCharCode ($rparen);
1401
- needsDeprecationWarning = true ;
1402
-
1403
- default :
1404
- error ("Invalid function name." , scanner.spanFrom (identifierStart));
1405
- }
1406
- }
1407
-
1408
- whitespace ();
1409
- if (! scanner.scanChar ($comma)) break ;
1410
-
1411
- buffer.writeCharCode ($comma);
1412
- buffer.write (rawText (whitespace));
1413
- }
1414
-
1415
- var value = buffer.interpolation (scanner.spanFrom (valueStart));
1416
- return _withChildren (_statement, start, (children, span) {
1417
- if (needsDeprecationWarning) {
1418
- warnings.add ((
1419
- deprecation: Deprecation .mozDocument,
1420
- message:
1421
- "@-moz-document is deprecated and support will be removed in "
1422
- "Dart Sass 2.0.0.\n "
1423
- "\n "
1424
- "For details, see https://sass-lang.com/d/moz-document." ,
1425
- span: span
1426
- ));
1427
- }
1428
-
1429
- return AtRule (name, span, value: value, children: children);
1430
- });
1431
- }
1432
-
1433
1346
/// Consumes a `@return` rule.
1434
1347
///
1435
1348
/// [start] should point before the `@` .
0 commit comments