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

Stop using / as division #663

Open
1 of 3 tasks
Tracked by #2565
nex3 opened this issue Apr 30, 2019 · 2 comments
Open
1 of 3 tasks
Tracked by #2565

Stop using / as division #663

nex3 opened this issue Apr 30, 2019 · 2 comments
Milestone

Comments

@nex3
Copy link
Contributor

nex3 commented Apr 30, 2019

  • Deprecation, divide(), and slash-list()
  • Removal of /-as-division, deprecation of slash-list()
  • Removal of slash-list()

See sass/sass#2565

nex3 added a commit that referenced this issue Jun 5, 2019
nex3 added a commit that referenced this issue Jun 12, 2019
nex3 added a commit that referenced this issue Jun 12, 2019
nex3 added a commit that referenced this issue May 10, 2021
nex3 added a commit that referenced this issue May 11, 2021
nex3 added a commit that referenced this issue May 12, 2021
nex3 added a commit that referenced this issue May 12, 2021
@tysonmatanich
Copy link

Is there a perf or other difference between using calc(9 / 16) vs math.div(9, 16)? I read through the docs and couldn't figure out the reason for using one over the other. Thanks!

@jathak
Copy link
Member

jathak commented Jan 26, 2022

For division on literals, both should be equivalent (there should be minimal, if any, performance differences), but in more complicated cases, Sass may not be able to fully simplify a calc at compile time (e.g. 40px + 10%), so it will be emitted in the final CSS, whereas math.div will always either return a number or produce an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants