modularscale/modularscale-sass

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

mixxorz opened this issue · 5 comments

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

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?

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

Thanks, I am able to replicate and will fix soon

Fixed, thanks y’all for the report!

Wow! Thanks for the really fast response and fix!