简体   繁体   中英

Susy 'context-slice of `12` can not be determined based on grid-columns `12`'

I have tried to install susy with npm and gulp, but get this error

Error in plugin 'sass' Message: node_modules\\susy\\sass\\susy_utilities.scss Error: [susy-normalize-columns] context-slice of 12 can not be determined based on grid-columns '12'.

on line 43 of node_modules/susy/sass/susy/_utilities.scss

>> @error '[#{$source}] #{$message}'; ---------^

This is all code that i have in header.sass

@import 'susy'
$susy: ( columns: 12, container: 1400px, 'grid-padding': 15px)

.nav
    &__logo
        width: susy-span(6 of 12)

And there is a gulpfile

gulp.task('header-sass', ['pug'], function(){
    gulp.src('app/header.sass')
    .pipe(sass({
        includePaths: [
            'node_modules/susy/sass'
        ]
    }))
    .on('error', sass.logError)
    .pipe(gulp.dest('app/'));
});

Found error. It was because this property is no longer accepts numeric values such as '12', '2' etc.. since 3.0.0 version, so i would use susy-repeat() instead

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM