twolfson / gulp.spritesmith

Convert a set of images into a spritesheet and CSS variables via gulp
The Unlicense
1.08k stars 81 forks source link

Css Syntax Error #112

Closed yohored closed 7 years ago

yohored commented 7 years ago

Hi, I have this issue, and no idea what's happening. If you need further information, please let me know.

screenshot

twolfson commented 7 years ago

It looks like you are using SCSS with postcss which is designed for CSS. You have 2 options:

I'm going to guess you want the latter since you are on postcss so here's how you do that:

If files must be named .scss in your project, then set cssFormat:

spritesmith({
  imgName: 'sprite.png',
  cssName: 'sprite.scss',
  cssFormat: 'css'
})

If your files can be named .css, then rename the cssName and remove a cssFormat if there is one:

spritesmith({
  imgName: 'sprite.png',
  cssName: 'sprite.css'
})

If you found this help useful and would like to support the project, please consider tipping us here: http://twolfson.com/support-me