Skip to content

Commit

Permalink
[scss] error when @function inside @Keyframes
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Nov 13, 2023
1 parent f55163f commit b4db82f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/parser/scssParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export class SCSSParser extends cssParser.Parser {
public _parseKeyframeSelector(): nodes.Node | null {
return this._tryParseKeyframeSelector()
|| this._parseControlStatement(this._parseKeyframeSelector.bind(this))
|| this._parseFunctionDeclaration()
|| this._parseVariableDeclaration()
|| this._parseMixinContent();
}
Expand Down
1 change: 1 addition & 0 deletions src/test/scss/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ suite('SCSS - Parser', () => {
assertNode('@keyframes test-keyframe { @for $i from 1 through 60 { $s: ($i * 100) / 60 + "%"; } }', parser, parser._parseKeyframe.bind(parser));

assertNode('@keyframes name { @for $i from 0 through m.$steps { #{$i * (100%/$steps)} { transform: $rotate $translate; } } }', parser, parser._parseKeyframe.bind(parser));
assertNode('@keyframes name { @function bar() { } }', parser, parser._parseKeyframe.bind(parser)); // #197742
});

test('@extend', function () {
Expand Down

0 comments on commit b4db82f

Please sign in to comment.