- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 25 Sep 2014 10:42:52 -0700
- To: Juergen Roethig <roethig@dhbw-karlsruhe.de>
- Cc: www-svg <www-svg@w3.org>
On Thu, Sep 25, 2014 at 9:41 AM, Juergen Roethig <roethig@dhbw-karlsruhe.de> wrote: > Robert Longson wrote: >> So SVG inline in a HTML or external referenced by an <object> <iframe> or >> <embed> tag can share the same stylesheet as the html document. In fact if >> the SVG is inline in the HTML that's pretty much a given. >> >> But if the SVG is displayed using a HTML <img> tag or an SVG <image> tag >> or a background-image CSS then it cannot share the same stylesheet because >> the SVG must then be complete in a single file. > > > That's what I was talking about: In a similar way as you may reference an > external stylesheet in an HTML file (via the <link> tag), you may reference > the very same external stylesheet in an SVG document (not via a <link> tag > which does not exist in SVG, but via a <?xml-stylesheet ?> declaration, as > the usual way for XML files to reference CSS files). Your assumption "[...] > the SVG must then be complete in a single file" is simply wrong - your SVG > file may reference CSS files as well as JavaScript files, it may even be > generated by another (non-SVG) XML file which references an XSLT file which > might again reference other files ... > > Once again, what's your problem or issue with that? SVG embedded as <html:img> or <svg:image> *cannot* reference external resources. SVG embedded in a document-like way (<object>, <iframe>, etc.) can. This is what Robert is trying to say. Did you not catch that distinction, or are you not aware that external resources are blocked when SVG is referenced in an "image-like" way? ~TJ
Received on Thursday, 25 September 2014 17:43:39 UTC