@@ -846,7 +846,19 @@ abstract class StylesheetParser extends Parser {
846846 FunctionRule _functionRule (LineScannerState start) {
847847 var precedingComment = lastSilentComment;
848848 lastSilentComment = null ;
849+ var beforeName = scanner.state;
849850 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+
850862 whitespace ();
851863 var arguments = _argumentDeclaration ();
852864
@@ -1261,7 +1273,19 @@ abstract class StylesheetParser extends Parser {
12611273 MixinRule _mixinRule (LineScannerState start) {
12621274 var precedingComment = lastSilentComment;
12631275 lastSilentComment = null ;
1276+ var beforeName = scanner.state;
12641277 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+
12651289 whitespace ();
12661290 var arguments = scanner.peekChar () == $lparen
12671291 ? _argumentDeclaration ()
0 commit comments