modularscale / modularscale-sass

Modular scale calculator built into your Sass
http://www.modularscale.com
MIT License
1.98k stars 132 forks source link

ms(0) returns the 1st value in the scale instead of the 0th #138

Closed mixxorz closed 7 years ago

mixxorz commented 7 years ago

Code

$modularscale: (
  base: 16px,
  ratio: 1.5
);

@debug ms(-1);
@debug ms();
@debug ms(0);
@debug ms(1);
@debug ms(2);

Output

DEBUG: 11px
DEBUG: 24px
DEBUG: 24px
DEBUG: 24px
DEBUG: 36px
scottkellum commented 7 years ago

Thanks @mixxorz, I’m unable to replicate this issue, can you provide more info as to how you are running modular scale? Are you using ruby-sass, Compass, libsass, eyeglass, node-sass, and what version numbers?

wagich commented 7 years ago

I'm getting the same results using a minimal repro with the following gulpfile

gulp.task("test", function() {
    return gulp.src("test.scss")
        .pipe(sass());
});

Running nodejs 6.9.1 and gulp-sass@3.1.0 which uses node-sass@4.2.0

scottkellum commented 7 years ago

Thanks, I am able to replicate and will fix soon

scottkellum commented 7 years ago

Fixed, thanks y’all for the report!

mixxorz commented 7 years ago

Wow! Thanks for the really fast response and fix!