- From: Erik Dahlstrom <ed@opera.com>
- Date: Thu, 29 Mar 2012 21:49:54 +0100
- To: "Doug Schepers" <schepers@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: "public-svg-wg@w3.org" <public-svg-wg@w3.org>
On Thu, 29 Mar 2012 20:09:33 +0100, Tab Atkins Jr. <jackalmage@gmail.com>
wrote:
> On Thu, Mar 29, 2012 at 12:03 PM, Doug Schepers <schepers@w3.org> wrote:
>> Hi, folks-
>>
>> Can we talk about a couple of things today?
>>
>> 1) I had a conversation with fantasai, and she's asking for a way to
>> extract
>> part of an SVG image by its id, which seems reasonable. (see IRC log
>> below)
>
> According to SVG1.1, this should already be possible. Just wrap the
> part of the image in an <svg>, and then either refer to the <svg> or
> an element within it by #id.
>
> ~TJ
Yes, that's right. Here's an example of that:
http://xn--dahlstrm-t4a.net/tmp/sharp-icons/svg-icon-target.svg#chart
http://xn--dahlstrm-t4a.net/tmp/sharp-icons/svg-icon-target.svg#plus
Using a bit of CSS you can even manage to hide the parts you don't want to
see:
svg .icon { display: none }
svg .icon:target { display: inline }
The above examples work as intended in Opera, Firefox, Safari, Chrome and
IE.
Cheers
--
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Thursday, 29 March 2012 19:50:27 UTC