Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

svg-sprites

An AssetAggregator that creates SVG sprites with PNG fallbacks at needed sizes via dr-svg-sprites.

dependency

<dependency>
 <groupId>org.jooby</groupId>
 <artifactId>jooby-svg-sprites</artifactId>
 <version>1.0.0.CR8</version>
</dependency>

usage

assets {
  fileset {

    sprite: svg-sprites
    home: home.scss
  }

  svg-sprites {

    spriteElementPath: "images/svg-source",
    spritePath: "css"
  }

}

The spriteElementPath contains all the *.svg files you want to process. The spritePath indicates where to save the sprite, here you will find the following generated files: css/sprite.css, css/sprite.svg and css/sprite.png.

options

assets {
  fileset {

    sprite: svg-sprites
    home: home.scss
  }

  svg-sprites {

    spriteElementPath: "images/svg-source",
    spritePath: "css",
    layout: "vertical",
    sizes: {
      large: 24,
      small: 16
    },
    refSize: "large"
  }

}

Please refer to dr-svg-sprites for more details.