Giter Site home page Giter Site logo

Comments (4)

neatonk avatar neatonk commented on July 1, 2024

+1

from svg4everybody.

boarmanc avatar boarmanc commented on July 1, 2024

Same issue here. The following SVG file does not work with svg4everybody when the symbol 'folder_s' is referenced from HTML in a use statement. (i.e., it works in Chrome and FF but is not properly expanded in IE 8, 9, 10 or 11):

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
   <g id="folder_icon">
      <path d="..." />
  </g>
</defs>
  <symbol id="folder_s" viewBox="0 0 128 128">
      <use xlink:href="#folder_icon" />
  </symbol>
</svg>  

I was able to work around this by placing the group 'folder_icon' under the symbol tag, but this is not ideal.

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 1, 2024

This has been resolved in 2.0.0. Only <use> elements that are children of <svg> elements are shimmed.

from svg4everybody.

GuySartorelli avatar GuySartorelli commented on July 1, 2024

@jonathantneal
This seems to not be working correctly. The following works for me in Chrome and Firefox but not IE11. Note that the <use> elements are all exclusively children of <svg> elements.

In spritesheet.svg:

<svg xmlns="http://www.w3.org/2000/svg">
  <symbol id="some-symbol" viewBox="0 0 1471.17 2086.35">
    <path id="some-path" fill="currentColor" d="OMMITTED_FOR_BREVITY"/>
  </symbol>
  <svg id="some-symbol-left" viewBox="0 0 1471.17 2086.35" preserveAspectRatio="xMinYMid meet">
    <use href="#some-path"></use>
  </svg>
</svg>

In the html file:

<svg role="presentation" focusable="false">
  <use href="sprite-sheet.svg#some-symbol-left" />
</svg>

from svg4everybody.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.