svg-sprite / gulp-svg-sprite

SVG sprites & stacks galore — Gulp plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours
MIT License
647 stars 43 forks source link

Generated SCSS with related paths instead of absolute(same as in css) #89

Closed QuipHop closed 2 years ago

QuipHop commented 5 years ago

Hi I'm facing the problem when I need generate absolutely same file as default css, but with scss extension. When i'm changing the render mode to scss it changes the paths in generated file to absolute. Is there a way to avoid it? Thanks

{
    "dest": "src/",
    "mode": {
        "css": {
            "dest": "",
            "sprite": "./assets/icons/icons-sprite",
            "dimensions": true,
            "example": false,
            "prefix": ".%s",
            "render": {
                "scss": {
                    "dest": "./assets/stylesheets/sprites_all.scss",
                    "template": "./src/sprite-template.css"                
                }
            }
        }
    },
    "shape": {
        "id": {        
            "pseudo": "~"
        } 
    }
}
sh4rov commented 4 years ago

I have it configured this way

const config = {
  mode: {
    symbol: {
      sprite: '../sprite.svg',
      render: {
        scss: {
          dest: '../../../../src/styles/utils/_sprite.scss',
          template: 'src/styles/templates/_sprite_template.scss',
        },
      },
    },
  },
}
Kreeg commented 2 years ago

@QuipHop @sh4rov is this still a thing?

Kreeg commented 2 years ago

Closing this due to inactivity. If you still have a problem please open a new issue