Closed gingerrific closed 10 years ago
The current _position.scss will spit out: "node_modules/node-bourbon/assets/stylesheets/addons/position:17: error: argument $number
of unitless($number)
must be a number" in terminal upon usage with gulp-sass
Awesome thanks! Do you mind also posting your usage of it which threw the error? I'm going to add it as a test case since apparently it wasn't getting caught by the current tests.
var gulp = require('gulp'),
gutil = require('gulp-util'),
sass = require('gulp-sass'),
csso = require('gulp-csso'),
uglify = require('gulp-uglify'),
jade = require('gulp-jade'),
concat = require('gulp-concat'),
livereload = require('gulp-livereload'), // Livereload plugin needed: https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei
tinylr = require('tiny-lr'),
express = require('express'),
app = express(),
marked = require('marked'), // For :markdown filter in jade
path = require('path'),
bourbon = require('node-bourbon').includePaths,
server = tinylr();
// --- Basic Tasks ---
gulp.task('css', function() {
return gulp.src('src/assets/stylesheets/*.scss')
.pipe(
sass( {
includePaths: ['src/assets/stylesheets'].concat(bourbon),
errLogToConsole: true
} ) )
.pipe( csso() )
.pipe( gulp.dest('dist/assets/stylesheets/') )
.pipe( livereload( server ));
});
Running the above through gulpfile.js
Ah sorry, I meant the usage in your stylesheet. I test against the examples in the Bourbon documentation to ensure that it compiles with node-sass without errors like the one you received. I would like to add your use case to the test fixture so that it's covered going forward. (see https://github.com/lacroixdesign/node-bourbon/blob/master/test/fixtures/features.scss)
Haha. Apologies.
error disappears when using "0" instead of null.
Using the updated version will accept either form.
Perfect, thanks!
Update position add on to utilize false/null rather than unitless zero values as per bourbon 3.3