Compass adding leading slash when generating sprite

后端 未结 1 393
一向
一向 2021-01-27 22:40

I have just generated a sprite with compass, but for some reason it is adding a leading slash in the generated class url. Is it possible to override this or is it something I ha

相关标签:
1条回答
  • 2021-01-27 23:18

    Appologies, as soon as I posted the question I found the answer to another question here ...

    Compass throwing in forward slash in front of images when making sprites

    ANSWER:

    By default, compass uses absolute paths for all assets.

    To change this behaviour, add this line to your config.rb:

    relative_assets = true
    

    Otherwise, you could also change the 'http_path' option to point to where your project sites on your deployment server.

    0 讨论(0)
提交回复
热议问题