glebmachine / postcss-easysprites

Easy sprites for postcss. Just append `#spritename` to the end of image url. No complicated mechanism or strict folder structure.
MIT License
61 stars 8 forks source link

Generates spritesheet from single css file #182

Open kalpeshsingh opened 6 years ago

kalpeshsingh commented 6 years ago

Hey Gleb,

I'm using CSS Modules in my project and I have one css file per component. When I refer to the same sprite name in two different spritesheet then sprite is generated from single css file and doesn't take icons from different stylesheets into the account.

Example -

/* Modal.css */
.closeIcon {
 background-image: ('../../path/to/icon.png#sprite');
}
/* Dropdown.css */
.arrow {
 background-image: ('../../path/to/icon.png#sprite');
}

Now, The the generated sprite is taking only one file into the account and generating sprite. Ideally, it should take all the icons from different css files and spit out into single sprite.png.

glebmachine commented 6 years ago

Yeah, that is not tested

I’m stop mantain this package about a year ago. But, feel free to fork and pr (don’t forget to cover new functionality with tests) -- Gleb Mikheev CTO

Beta Bersenevsky Lane 5 Building 1

Mobile: +7 (916) 118-28-21 Telegram: https://t.me/glebmikheev Facebook: https://www.facebook.com/glebmachine

www.betaagency.ru https://www.facebook.com/beta.moscow/

kalpeshsingh commented 6 years ago

I would like to take a stab on this, can you point me to right direction?

Where can I make changes? What kind of changes it will require?

glebmachine commented 6 years ago

I can't point you, need to research on this(

shyam528 commented 6 years ago

I have also faced the same issue. .any success?

kalpeshsingh commented 4 years ago

@glebmachine - Thanks for releasing 1.0.0. Any plan to consider this issue?