Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Latest commit

 

History

History
68 lines (48 loc) · 1.27 KB

File metadata and controls

68 lines (48 loc) · 1.27 KB

svg-sprites

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

{{assets-require.md}}

dependency

<dependency>
 <groupId>org.jooby</groupId>
 <artifactId>jooby-assets-svg-sprites</artifactId>
 <version>{{version}}</version>
 <scope>provided</scope>
</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.

see also

{{available-asset-procesors.md}}