lacroixdesign / node-bourbon

A node-sass port of Bourbon.
http://lacroixdesign.github.io/node-bourbon
Other
148 stars 14 forks source link

Update _position.scss #6

Closed gingerrific closed 10 years ago

gingerrific commented 10 years ago

Update position add on to utilize false/null rather than unitless zero values as per bourbon 3.3

gingerrific commented 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

iamlacroix commented 10 years ago

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.

gingerrific commented 10 years ago

screen shot 2014-05-06 at 4 43 25 pm

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

iamlacroix commented 10 years ago

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)

gingerrific commented 10 years ago

Haha. Apologies. screen shot 2014-05-06 at 4 56 23 pm

gingerrific commented 10 years ago

error disappears when using "0" instead of null.

gingerrific commented 10 years ago

Using the updated version will accept either form.

iamlacroix commented 10 years ago

Perfect, thanks!