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

padding / margin not provided with fallback? #1

Closed
phonoloop opened this issue Apr 2, 2015 · 7 comments
Closed

padding / margin not provided with fallback? #1

phonoloop opened this issue Apr 2, 2015 · 7 comments

Comments

@phonoloop
Copy link

I cannot get fallbacks for padding/margin.

Example:
+rem((font-size: 22px, padding: 9px 6px 4px))

Output:
Font-size is ok but padding only gives rem values.

Maybe it's because i'm using the Sass syntax and not SCSS?

@pierreburel
Copy link
Owner

Hi!

I don't use the .sass syntax, but I just tested with Sass 3.4.13 and I have no issues : https://gist.github.com/pierreburel/69b5c566280af10fef9d

What do you use to compile your .sass files ?

@phonoloop
Copy link
Author

Hi Pierre

Your code is working perfectly indeed.
I've tested my code in Sassmeister and had not issues at all.
Only when compiling with Gulp it seems to remove the px values for padding and margin.
I guess I need to recheck my script.

Thanks for your time. :-)

@pierreburel
Copy link
Owner

I just tested with Gulp and node-sass/libsass and still no issues : https://gist.github.com/pierreburel/69b5c566280af10fef9d

Really strange, maybe you have another Gulp task(s) removing/cleaning some stuff?

@phonoloop
Copy link
Author

Yes, I do have some other tasks running.
The only thing I've noticed is that you're using gulp-sass while i'm using gulp-ruby-sass.
The reason why I use the ruby version is because of autoprefixer.

All these automation tools are great as long as those packages work together. But when they don't, a real pain in the butt if you ask me. :-)

@pierreburel
Copy link
Owner

If you use the Ruby version of Sass just for Autoprefixer, you should totally use it directly with gulp-postcss (https://github.com/postcss/autoprefixer#gulp) so you can use LibSass, which is way faster.

Closing the ticket for now, and thanks for using sass-rem !

@pierreburel
Copy link
Owner

Here's just an example of a really simple gulpfile with sass and autoprefixer:

var gulp = require('gulp');
var sass = require('gulp-sass');
var postcss = require('gulp-postcss');
var autoprefixer = require('autoprefixer-core');

gulp.task('default', function () {
  gulp.src('./*.sass')
      .pipe(sass({indentedSyntax: true}))
      .pipe(postcss([ autoprefixer({ browsers: ['last 2 version'] }) ]))
      .pipe(gulp.dest('./'));
});

@pierreburel
Copy link
Owner

Just an update since someone reported the same problem: sounds like a gulp-minify-css/clean-css issue, cf. https://github.com/murphydanger/gulp-minify-css/issues/46
See advanced and compatibility options : https://github.com/jakubpawlowicz/clean-css#how-to-set-compatibility-mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants