dlmanning / gulp-sass

SASS plugin for gulp
MIT License
1.57k stars 381 forks source link

Math operator / don't work #754

Closed BulatSa closed 2 years ago

BulatSa commented 4 years ago

Hello, i use last version gulp-sass 4.0.2 SASS .class { line-heght: 14 / 10; } compile to CSS .class { line-heght: 14 / 10; } But this should be line-heght: 1.4;

I use defaul gulp settings:

// Process, lint, and minify Sass files
var buildStyles = function (done) {

// Run tasks on all Sass files
return src(paths.styles.input)
    .pipe(sass({
        outputStyle: 'expanded',
        sourceComments: false
    }))
    .pipe(postcss([
        prefix({
            cascade: true,
            remove: true
        })
    ]))
    .pipe(header(banner.main, {package: package}))
    .pipe(dest(paths.styles.output))
    .pipe(rename({suffix: '.min'}))
    .pipe(postcss([
        minify({
            discardComments: {
                removeAll: true
            }
        })
    ]))
    .pipe(dest(paths.styles.output));

};
SahilDude89ss commented 4 years ago

Hi @BulatSa I am having a similar issue, were you able to find a solution to the problem?

Thanks

BulatSa commented 4 years ago

Hi @BulatSa I am having a similar issue, were you able to find a solution to the problem?

Thanks

I use css operator calc() for work, it's little solution

albedoa commented 4 years ago

You have to coerce one of the strings to a number:

.class { line-height: (14)/10; }
nitro404 commented 4 years ago

This sounds like an issue with an outdated version of https://github.com/sass/node-sass to me, since this is only a lightweight wrapper around this module.

albedoa commented 4 years ago

The symbol / is used in shorthand CSS properties. The behavior observed by OP is correct.

XhmikosR commented 2 years ago

@xzyfer this is also unrelated to gulp-sass.