How to insert new image into project with COMPASS

6

I have the images I use in my project and I want to add a new image to use on the site, but I can not get the image to be added to the sprites generated by COMPASS

    
asked by anonymous 24.06.2016 / 19:14

1 answer

1

To make sprite with compass, we need to isolate the images that we want to put together in a folder, which will be called sprite and will be inside the images folder. We need to tell Compass that whenever there is a .png file in the folder, it needs to be updated. To do this, we will go to your main.scss and add a line that says this:

@import 'sprite/*.png'

See that after saving the terminal will respond

create imagens/sprite-s1e1f3a7a9e.png

He reports that Compass has created a sprite with that name And after doing and undoing with that little change in your main.scss, just so that Compass detects a change and compile again, you can check the result in the images folder.

    
01.04.2017 / 17:33