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

Modulo & negative dividends #2236

Closed
KittyGiraudel opened this issue Dec 5, 2016 · 1 comment
Closed

Modulo & negative dividends #2236

KittyGiraudel opened this issue Dec 5, 2016 · 1 comment

Comments

@KittyGiraudel
Copy link

KittyGiraudel commented Dec 5, 2016

Bug with module operator & negative dividends

input.scss

.foo {
  test-01: +1 % +4;
  test-02: +1 % -4;
  test-03: -1 % +4;
  test-04: -1 % -4;
}

libsass 3.3.6

.foo {
  test-01: 1;
  test-02: 1;
  test-03: 1;
  test-04: 1; }

ruby sass 3.4.21

.foo {
  test-01: 1;
  test-02: -3;
  test-03: 3;
  test-04: -1; }

version info:

libsass         3.3.6  (Sass Compiler) [C/C++]
@mgreter
Copy link
Contributor

mgreter commented Dec 5, 2016

Thanks for the report. I've update your sample to include more cases with different signs.
https://en.wikipedia.org/wiki/Modulo_operation#Remainder_calculation_for_the_modulo_operation

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

2 participants