Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for function call expressions #2519

Merged
merged 2 commits into from
Feb 22, 2025
Merged

Add support for function call expressions #2519

merged 2 commits into from
Feb 22, 2025

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Feb 20, 2025

No description provided.

@nex3 nex3 requested a review from Goodwine February 20, 2025 21:37
});

describe('if()', () => {
beforeEach(() => void (node = utils.parseExpression('if(cond, bar, baz)')));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL if() is a function in Sass! 🤯

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only sort of! It's actually technically its own syntactic construct, distinct from a standard function in that it only ever evaluates one of the true or false branches. Honestly at this point we could just make it check that at runtime like we do for calc() et al, but we haven't made that change yet.

@nex3 nex3 merged commit c540875 into main Feb 22, 2025
39 checks passed
@nex3 nex3 deleted the function branch February 22, 2025 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants