Replace / division with multiplication and custom divide() function#34245
Conversation
…ater compatibility
|
I don't think these "division-to-multiplication" conversions across all files should be made, as it adds complexity to reading the whole code. Why not use newly introduced |
voltaek
left a comment
There was a problem hiding this comment.
Looks like some copy/paste errors
I didn't want to require a function where it wasn't explicitly needed. Dividing by 2 or multiplying by .5 feels common enough to me to avoid changing |
Agreed for simple divisions. And I see you fixed this issue for more complicated divisions. All is good, thank you! |
|
Do you plan to backport the same thing to 4.x? |
Here's the PR: #34571 looks like we're close! :) |
Fixes #34051.
This PR aims to resolve the Sass
/deprecation issues from Dart Sass. One direction could've been to drop Libsass entirely, using the Dart Sass math module, but that'd effectively ruin any hope for support for Libsass-based projects. That matters not because we want to support something old and deprecated, but because there are dozens if not hundreds of projects that haven't updated to Dart Sass yet. Plus, it's easy enough for us to resolve on our own end without breaking things for others, so why not.To make this happen, I've replaced the bulk of the division with multiplication, and then used a custom
divide()function (thanks @alpadev!) to replace what I couldn't easily switch to multiplication.Once we get this reviewed and merged, we'll be able to ship v5.0.2.
/cc @twbs/css-review