@@ -846,7 +846,19 @@ abstract class StylesheetParser extends Parser {
846
846
FunctionRule _functionRule (LineScannerState start) {
847
847
var precedingComment = lastSilentComment;
848
848
lastSilentComment = null ;
849
+ var beforeName = scanner.state;
849
850
var name = identifier (normalize: true );
851
+
852
+ if (name.startsWith ('--' )) {
853
+ logger.warnForDeprecation (
854
+ Deprecation .cssFunctionMixin,
855
+ 'Sass @function names beginning with -- are deprecated for forward-'
856
+ 'compatibility with plain CSS mixins.\n '
857
+ '\n '
858
+ 'For details, see https://sass-lang.com/d/css-function-mixin' ,
859
+ span: scanner.spanFrom (beforeName));
860
+ }
861
+
850
862
whitespace ();
851
863
var arguments = _argumentDeclaration ();
852
864
@@ -1261,7 +1273,19 @@ abstract class StylesheetParser extends Parser {
1261
1273
MixinRule _mixinRule (LineScannerState start) {
1262
1274
var precedingComment = lastSilentComment;
1263
1275
lastSilentComment = null ;
1276
+ var beforeName = scanner.state;
1264
1277
var name = identifier (normalize: true );
1278
+
1279
+ if (name.startsWith ('--' )) {
1280
+ logger.warnForDeprecation (
1281
+ Deprecation .cssFunctionMixin,
1282
+ 'Sass @mixin names beginning with -- are deprecated for forward-'
1283
+ 'compatibility with plain CSS mixins.\n '
1284
+ '\n '
1285
+ 'For details, see https://sass-lang.com/d/css-function-mixin' ,
1286
+ span: scanner.spanFrom (beforeName));
1287
+ }
1288
+
1265
1289
whitespace ();
1266
1290
var arguments = scanner.peekChar () == $lparen
1267
1291
? _argumentDeclaration ()
0 commit comments