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 CSS round() with one unitless argument #2436

Merged
merged 3 commits into from
Nov 15, 2024
Merged

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Nov 13, 2024

This also adds deprecation warnings for cases where a CSS calculation
is determined to need to mimic a global Sass function, to match the
global Sass function deprecation.

See sass/sass#3803
Closes #2433

See sass/sass-spec#2037

@nex3 nex3 requested a review from pamelalozano16 November 13, 2024 01:52
This also adds deprecation warnings for cases where a CSS calculation
is determined to need to mimic a global Sass function, to match the
global Sass function deprecation.

See sass/sass#3803
Closes #2433
Deprecation.globalBuiltin);
compatible = true;
}
if (compatible) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it better to just make compatible a const and return

return operator == CalculationOperator.plus
              ? left.plus(right)
              : left.minus(right);

either way? Since compatible is set to true if it's false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

compatible is only set to true if inLegacySassFunction != null && left.isComparableTo(right).

@nex3 nex3 merged commit 57a6853 into main Nov 15, 2024
39 checks passed
@nex3 nex3 deleted the one-arg-round branch November 15, 2024 01:18
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.

Implement round() with no modulus
2 participants