Giter Site home page Giter Site logo

Comments (19)

jonathantneal avatar jonathantneal commented on July 19, 2024

Well, I’ll just have to fix that now, won’t I.

from svg4everybody.

intterra avatar intterra commented on July 19, 2024

I am experiencing this issue as well. On IE11, the svg does actually load, but it is not displaying for some reason.

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

@afram, @intterra, the technique described at css-tricks will not work as expected with external SVGs in any browser. The viewBox attribute will be ignored, whether it is on the external <symbol> or <svg> element. As with the <use> technique, IE will ignore the external SVG all together.

If you prefer using <symbol>, svg4everybody will be need to be updated to patch every browser.

@intterra, I’m interested in knowing what you mean by load. Do you mean it making a request for the SVG?

from svg4everybody.

intterra avatar intterra commented on July 19, 2024

I mean I can see IE making the AJAX request, and I can inspect the DOM afterward and see the svg markup where the element used to be. But IE does not display the resulting svg elements.

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

Oh, you mean svg4everybody is making a request. Yes, it is. This script is already getting you halfway there.

Now, again, to be clear, this technique does not work in ANY browser without JavaScript. What I would update is more hypothetical than polyfill.

from svg4everybody.

afram avatar afram commented on July 19, 2024

@jonathantneal That technique does work with external sprite sheet of SVG symbols. I have successfully used it for all browsers except IE.

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

@afram, here is the demo that it fails for me in all browsers. Would you share the one that works?

from svg4everybody.

intterra avatar intterra commented on July 19, 2024

update: the issue is that IE11 does not like the symbol tag. If I switch from symbol to g, it works.

from svg4everybody.

afram avatar afram commented on July 19, 2024

@jonathantneal 404 :-(

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

@intterra, <g> has always worked in all browsers sans IE. This issue is in regard to <symbol>.

@afram, updated URL.

from svg4everybody.

afram avatar afram commented on July 19, 2024

@jonathantneal clicking on the 'add external svg' adds something to the screen for me, but it's proportions are wrong. I'll add a demo with my code in a sec

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

@afram, this is precisely what I mean by will not work as expected and #10 (comment)

from svg4everybody.

afram avatar afram commented on July 19, 2024

@jonathantneal Here it is: https://dl.dropboxusercontent.com/u/46814417/svgtest/index.html

from svg4everybody.

afram avatar afram commented on July 19, 2024

@jonathantneal I should add. I found that using styles inside of my index.html gave me odd and poor results when using your polyfil (before it became symbols). Have you tried externalising your CSS?

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

Doh, we’re referencing the wrong SVG!

from svg4everybody.

afram avatar afram commented on July 19, 2024

@jonathantneal :-)

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

Resolved with 3ac4279

Have fun!

from svg4everybody.

afram avatar afram commented on July 19, 2024

@jonathantneal sweet, works a treat, thanks!

from svg4everybody.

intterra avatar intterra commented on July 19, 2024

Thanks, works great.

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.