svg-sprite / grunt-svg-sprite

SVG sprites & stacks galore — Grunt 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

Home Page:https://github.com/svg-sprite/svg-sprite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid markup in HTML example document

superfine opened this issue · comments

The HTML example document incorrectly renders the closing tag of the <svg> as </shapes> instead of </svg>. Can I fix this myself somehow? Thanks.

    <li title="icon-s-twitter">
          <div class="icon-box">
            
            <!-- icon-s-twitter -->
            <svg viewBox="0 0 70 70" class="cwt-icon-s-twitter-dims">
              <use xlink:href="#icon-s-twitter"></use>
            </shapes>
            
          </div>
          <h2>icon-s-twitter</h2>
    </li>

My grunt file:

grunt.config.set('svg_sprite', {
    sprites: {
      expand: true,
      cwd: 'src/img/svg/',
      src: ['**/*.svg'],
      dest: 'src/img/',
      options: {
        shape: {
          spacing: {
            padding: 0,
            box: 'padding'
          }
        },
        mode: {
          defs: {
            dest: 'sprites',
            layout: 'vertical',
            prefix: '.cwt-%s',
            sprite: 'svg/sprites.svg',
            bust: true,
            inline: true,
            example: {
              dest: 'sprites.html'
            }
          }
        }
      }
    }
  });

@superfine First of all sorry for the late reply! This is in fact a bug in svg-sprite and I created an issue for it over there. It's going to be fixed in the next release (which I expect to come soon).