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

Support additional calculation functions #3504

Open
11 of 14 tasks
nex3 opened this issue Mar 9, 2023 · 3 comments
Open
11 of 14 tasks

Support additional calculation functions #3504

nex3 opened this issue Mar 9, 2023 · 3 comments
Labels
CSS compatibility Support the CSS spec enhancement New feature or request planned We would like to add this feature at some point

Comments

@nex3 nex3 added enhancement New feature or request CSS compatibility Support the CSS spec planned We would like to add this feature at some point labels Mar 9, 2023
@nex3 nex3 changed the title Support trig calculations Support additional calculation functions Mar 23, 2023
@nex3
Copy link
Contributor Author

nex3 commented Apr 13, 2023

The proposal is out for review. Since it involves some complexity with the handling of cases like abs(10%) and involves a small breaking change to the behavior of %, I'm going to give it a month for public comment.

@nex3
Copy link
Contributor Author

nex3 commented Aug 17, 2023

I'm reopening this. When I wrote the specification, I overlooked a case where it could break existing Sass stylesheets. If a user defines a function with the same name as a new calculation function (a common one is rem(), used to convert lengths to the rem unit), any calls to this custom function would now be parsed as CSS calculation syntax.

While we figure out how to handle this case, I'm going to:

  • Revert this change.
  • Cut a release without this.

Once we figure out the right way forward, we'll follow our standard compatibility policy for CSS compatibility changes, in which we'll provide deprecation warnings for three months before updating the any breaking change lands.

@nex3
Copy link
Contributor Author

nex3 commented Aug 17, 2023

#3657 updates the calc functions proposal to provide a deprecation process that will continue to support existing rem() functions until Dart Sass 3.0. I'm very interested in any user feedback on this update.

nex3 added a commit to sass/dart-sass that referenced this issue Aug 17, 2023
nex3 added a commit that referenced this issue Aug 18, 2023
This allows calculation syntax to coexist with user-defined Sass
functions instead of needing every new calculation function to break
all existing Sass functions of the same name.

See #3504
nex3 added a commit that referenced this issue Aug 28, 2023
This allows calculation syntax to coexist with user-defined Sass
functions instead of needing every new calculation function to break
all existing Sass functions of the same name.

See #3504
nex3 added a commit that referenced this issue Sep 18, 2023
nex3 added a commit that referenced this issue Sep 18, 2023
@nex3 nex3 removed their assignment Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS compatibility Support the CSS spec enhancement New feature or request planned We would like to add this feature at some point
Projects
None yet
Development

No branches or pull requests

2 participants