public class SvgSprites extends AssetAggregator
An AssetAggregator that creates SVG sprites with PNG fallbacks at needed sizes via
dr-svg-sprites.
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.
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.
| Constructor and Description |
|---|
SvgSprites() |
| Modifier and Type | Method and Description |
|---|---|
String |
cssPath() |
List<String> |
fileset() |
void |
run(com.typesafe.config.Config conf) |
SvgSprites |
set(com.typesafe.config.Config options) |
SvgSprites |
set(String name,
Object value) |
String |
spritePath() |
name, toStringexcludes, get, optionspublic SvgSprites set(com.typesafe.config.Config options)
set in class AssetAggregatorpublic SvgSprites set(String name, Object value)
set in class AssetAggregatorpublic List<String> fileset()
fileset in class AssetAggregatorpublic void run(com.typesafe.config.Config conf)
throws Exception
run in class AssetAggregatorExceptionpublic String cssPath()
public String spritePath()
Copyright © 2017. All rights reserved.