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 specs for deprecated function names #1932

Closed
wants to merge 1 commit into from
Closed

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Aug 17, 2023

See #1899
See sass/sass#3504

[skip dart-sass]

Naming a Sass function "round" is deprecated because it conflicts with the new
CSS round() syntax. Either rename it or use the math.round() function.

More info: https:/sass-lang.com/d/math-fn-name
Copy link
Member

Choose a reason for hiding this comment

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

Already commented on dart-sass, but this is missing a slash after https:

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps this case is considered too exceptional, but is it worth adding tests for functions which are renamed to these newly reserved functions?

For example:

// foo.scss
@use "bar" as *;

a {
  color: round();
}

// bar.scss
@forward "baz" as r*;

// baz.scss
@function ound() { @return 0 }

Which today will compile without error, but in the future will fail (as it currently does for a similar setup with e.g. calc).

I had thought it was easier to rename identifiers for some reason -- i.e. without the use of @forward, but I can't think of any concrete way off the top of my head.

@nex3
Copy link
Contributor Author

nex3 commented Aug 29, 2023

Closing this out in favor of the approach described in sass/sass#3661

@nex3 nex3 closed this Aug 29, 2023
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.

3 participants