You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I've started using sprity. I wanted to create 4 sprites and 4 styles for 4 themes.
So, I faced with one problem:
first css file contains correct set of styles. for example: 3 styles: .fg-sprite { background-image: url('sprite-oceana.png'); } .fg-sprite-logos-chrysler { background-position: -0px -0px; width: 40px; height: 15px; } .fg-sprite-logos-ford { background-position: -0px -15px; width: 40px; height: 21px; }
Next css file contains information about previous one, and itself. So, there are 6 css styles: .fg-sprite { background-image: url('sprite-oceana.png'); } .fg-sprite-logos-chrysler { background-position: -0px -0px; width: 40px; height: 15px; } .fg-sprite-logos-ford { background-position: -0px -15px; width: 40px; height: 21px; }
.fg-sprite { background-image: url('sprite-bmw.png'); } .fg-sprite-logos-chrysler { background-position: -0px -0px; width: 40px; height: 15px; } .fg-sprite-logos-ford { background-position: -0px -15px; width: 40px; height: 21px; }
so, next css file contains information about previous two :)
I noticed, that global variable "layouts" in the style.js collects information without clearing.
This is my code: async.each(folders, function(folder, callback) { var stream = sprity.src({ src: path.join(pathAssetsThemes, folder, 'images/**/*.png'), out: path.join('./css', folder), name: 'sprite-' + folder, style: './_' + folder + '.scss', prefix: 'fg-sprite', cssPath: '', }); stream.on('finish', function() { console.log('finished'); callback(null, null); }); stream.on('error', function(err) { console.log('error'); callback(err); }); }, function(err) { console.log('ALL ARE FINISHED'); // if any of the saves produced an error, err would equal that error done(); });
The text was updated successfully, but these errors were encountered:
So, I've started using sprity. I wanted to create 4 sprites and 4 styles for 4 themes.
So, I faced with one problem:
first css file contains correct set of styles. for example: 3 styles:
.fg-sprite { background-image: url('sprite-oceana.png'); } .fg-sprite-logos-chrysler { background-position: -0px -0px; width: 40px; height: 15px; } .fg-sprite-logos-ford { background-position: -0px -15px; width: 40px; height: 21px; }
Next css file contains information about previous one, and itself. So, there are 6 css styles:
.fg-sprite { background-image: url('sprite-oceana.png'); } .fg-sprite-logos-chrysler { background-position: -0px -0px; width: 40px; height: 15px; } .fg-sprite-logos-ford { background-position: -0px -15px; width: 40px; height: 21px; }
.fg-sprite { background-image: url('sprite-bmw.png'); } .fg-sprite-logos-chrysler { background-position: -0px -0px; width: 40px; height: 15px; } .fg-sprite-logos-ford { background-position: -0px -15px; width: 40px; height: 21px; }
so, next css file contains information about previous two :)
I noticed, that global variable "layouts" in the style.js collects information without clearing.
This is my code:
async.each(folders, function(folder, callback) { var stream = sprity.src({ src: path.join(pathAssetsThemes, folder, 'images/**/*.png'), out: path.join('./css', folder), name: 'sprite-' + folder, style: './_' + folder + '.scss', prefix: 'fg-sprite', cssPath: '', }); stream.on('finish', function() { console.log('finished'); callback(null, null); }); stream.on('error', function(err) { console.log('error'); callback(err); }); }, function(err) { console.log('ALL ARE FINISHED'); // if any of the saves produced an error, err would equal that error done(); });
The text was updated successfully, but these errors were encountered: