- From: Juergen Roethig <roethig@dhbw-karlsruhe.de>
- Date: Thu, 25 Sep 2014 18:41:32 +0200
- To: <www-svg@w3.org>
Hello world, Robert Longson wrote: >> Ooops? For sure, _SVG_ images and HTMl files can (technically) share the >> same stylesheet - the (technical) solution is also written in that >> referenced part of the spec: "To get the same styling across both the >> [X]HTML document and the SVG document, link them both to the same style >> sheet." > > I think you've misunderstood. I'm talking about svg-as-an-image here. No, I think that I've not misunderstood. Yes, we are talking about svg as an image here ... > 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? Juergen Roethig
Received on Thursday, 25 September 2014 16:42:38 UTC