tars icon indicating copy to clipboard operation
tars copied to clipboard

Move from spritesmith to postcss-sprites.

Open ilyoff opened this issue 6 years ago • 9 comments

I suggest to move from spritesmith to postcss-sprites:

  • There is the same spritesmith module under the hood, so the quality of sprites will not changed
  • It has useful filterBy and groupBy options, which makes him very flexible
  • Out of the box makes sprites by retina prefixes (@2x, @3x, @4x), which resolves #321, and also makes prefixes customizable
  • We can get rid from sprite mixins by automatically adding needed rules to css file with onupdaterule hook or with separate plugin. That will help to resolve #314, cause will work without any non-standard css functionality (ex. postcss-mixins)
  • Also duplicates problem, mentioned in #257, when there are two images with the same name, but located in different directories, resolved by adding both images to the sprite, cause they are still different by location, which is right case, IMHO.

If this is ok, I can implement it

ilyoff avatar Nov 25 '18 22:11 ilyoff

Cool! As I understand raster-sprite for ie8 will not work with that approach, will it? I mean raster sprite of raster svg-icons.

artem-malko avatar Nov 26 '18 04:11 artem-malko

I think, we can deal somehow with it, but at last, can't we drop ie8 support in the end of 2018?)

ilyoff avatar Nov 26 '18 09:11 ilyoff

Ok, let's drop ie8. Add a warning message, if build was started with ie8 support. We need to make it mush more obviously for that users.

artem-malko avatar Nov 28 '18 16:11 artem-malko

Есть ли вообще смысл дальнейшей поддержки IE8? На сколько понимаю из плюх для неё остаётся лишь сборка отдельного файла стилей

DaveDev13 avatar Nov 28 '18 16:11 DaveDev13

@artem-malko you mean something like "ie8 no more supported?"

ilyoff avatar Nov 28 '18 19:11 ilyoff

@CcRaZyY и js) shim-файлы. @ilyoff 👍 Only for sprite generation. css and js have to be processed correctly. We can drop IE8 full support later.

artem-malko avatar Nov 29 '18 03:11 artem-malko

@ilyoff up) Will you develop with issue?)

artem-malko avatar Aug 12 '19 03:08 artem-malko

@artem-malko hi, yeah, half work already done) Sorry for taking this so long

ilyoff avatar Aug 16 '19 21:08 ilyoff

@ilyoff it's ok) Just sync info, I do not hurry you)

artem-malko avatar Aug 17 '19 13:08 artem-malko