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 constants in calculations #1922

Merged
merged 5 commits into from Mar 23, 2023
Merged

Add support for constants in calculations #1922

merged 5 commits into from Mar 23, 2023

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Mar 23, 2023

@nex3 nex3 requested a review from Goodwine March 23, 2023 02:23
@nex3 nex3 mentioned this pull request Mar 23, 2023
10 tasks
@@ -195,12 +195,14 @@ void sharedTests(Future<TestProcess> runSass(Iterable<String> arguments)) {

test("a runtime error", () async {
var sass = await runSass(["--interactive"]);
sass.stdin.writeln("max(2, 1 + blue)");
sass.stdin.writeln("@use 'sass:math'");
Copy link
Member

Choose a reason for hiding this comment

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

Just to confirm, this change is not required as part of the PR, and it is just a fly-by cleanup, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it's required—we actually consider max(2, 1 + blue) to be valid CSS now because max() is a calculation context and blue is an identifier.

@nex3 nex3 merged commit f5a3dea into main Mar 23, 2023
38 checks passed
@nex3 nex3 deleted the calc-constants branch March 23, 2023 22:59
jgerigmeyer added a commit to oddbird/dart-sass that referenced this pull request Mar 24, 2023
* main:
  Require node>=14.0.0 (sass#1911)
  Add support for constants in calculations (sass#1922)
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.

Add support for calc constants
2 participants