Skip to content

Commit

Permalink
Make docs for the config object consistent
Browse files Browse the repository at this point in the history
Added `svg.<node>` before each property in the table so it's consistent with the docs for `mode.<node>` and `shape.<node>`.
  • Loading branch information
brendanfalkowski committed Dec 14, 2016
1 parent ff2232f commit 47e7b55
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/configuration.md
Expand Up @@ -236,14 +236,14 @@ The `svg` object holds common options that apply to each SVG sprite created. The

Property | Type | Default | Description |
------------------------ | --------------- | ------------- | ------------------------------------------ |
`xmlDeclaration` | Boolean∣String | `true` | Output an XML declaration at the very beginning of each compiled sprite. If you provide a non-empty string here, it will be used one-to-one as declaration (e.g. `<?xml version="1.0" encoding="utf-8"?>`). If you set this to `TRUE`, *svg-sprite* will look at the registered shapes for an XML declaration and use the first one it can find. |
`doctypeDeclaration` | Boolean∣String | `true` | Include a `<DOCTYPE>` declaration in each compiled sprite. If you provide a non-empty string here, it will be used one-to-one as declaration (e.g. `<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">`). If you set this to `TRUE`, *svg-sprite* will look at the registered shapes for a DOCTYPE declaration and use the first one it can find. |
`namespaceIDs` | Boolean | `true` | In order to avoid ID clashes, the default behavior is to namespace all IDs in the source SVGs before compiling them into a sprite. Each ID is prepended with a unique string. In some situations, it might be desirable to disable ID namespacing, e.g. when you want to script the resulting sprite. Just set `svg.namespaceIDs` to `FALSE` then and be aware that you might also want to disable SVGO's ID minification (`shape.transform.svgo.plugins: [{cleanupIDs: false}]`). |
`namespaceClassnames` | Boolean | `true` | In order to avoid CSS class name ambiguities, the default behavior is to namespace CSS class names in the source SVGs before compiling them into a sprite. Each class name is prepended with a unique string. Disable this option to keep the class names untouched. |
`dimensionAttributes` | Boolean | `true` | If truthy, `width` and `height` attributes will be set on the sprite's `<svg>` element (where applicable). |
`rootAttributes` | Object | | Shorthand for applying custom attributes to the outermost `<svg>` element. Please be aware that certain attributes (e.g. `viewBox`) will be calculated dynamically and override custom `rootAttributes` in any case. |
`precision` | Integer | | Floating point precision for CSS positioning values (defaults to `-1` meaning highest possible precision). |
`transform` | Function∣Array | | Callback (or list of callbacks) that will be applied to the resulting SVG sprites as global [post-processing transformation](#svg-sprite-customization). |
`svg.xmlDeclaration` | Boolean∣String | `true` | Output an XML declaration at the very beginning of each compiled sprite. If you provide a non-empty string here, it will be used one-to-one as declaration (e.g. `<?xml version="1.0" encoding="utf-8"?>`). If you set this to `TRUE`, *svg-sprite* will look at the registered shapes for an XML declaration and use the first one it can find. |
`svg.doctypeDeclaration` | Boolean∣String | `true` | Include a `<DOCTYPE>` declaration in each compiled sprite. If you provide a non-empty string here, it will be used one-to-one as declaration (e.g. `<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">`). If you set this to `TRUE`, *svg-sprite* will look at the registered shapes for a DOCTYPE declaration and use the first one it can find. |
`svg.namespaceIDs` | Boolean | `true` | In order to avoid ID clashes, the default behavior is to namespace all IDs in the source SVGs before compiling them into a sprite. Each ID is prepended with a unique string. In some situations, it might be desirable to disable ID namespacing, e.g. when you want to script the resulting sprite. Just set `svg.namespaceIDs` to `FALSE` then and be aware that you might also want to disable SVGO's ID minification (`shape.transform.svgo.plugins: [{cleanupIDs: false}]`). |
`svg.namespaceClassnames` | Boolean | `true` | In order to avoid CSS class name ambiguities, the default behavior is to namespace CSS class names in the source SVGs before compiling them into a sprite. Each class name is prepended with a unique string. Disable this option to keep the class names untouched. |
`svg.dimensionAttributes` | Boolean | `true` | If truthy, `width` and `height` attributes will be set on the sprite's `<svg>` element (where applicable). |
`svg.rootAttributes` | Object | | Shorthand for applying custom attributes to the outermost `<svg>` element. Please be aware that certain attributes (e.g. `viewBox`) will be calculated dynamically and override custom `rootAttributes` in any case. |
`svg.precision` | Integer | | Floating point precision for CSS positioning values (defaults to `-1` meaning highest possible precision). |
`svg.transform` | Function∣Array | | Callback (or list of callbacks) that will be applied to the resulting SVG sprites as global [post-processing transformation](#svg-sprite-customization). |


#### SVG sprite customization
Expand Down

0 comments on commit 47e7b55

Please sign in to comment.