- From: Robin Berjon <robin@berjon.com>
- Date: Wed, 14 Mar 2012 21:03:36 +0100
- To: Philippe Le Hegaret <plh@w3.org>
- Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Cameron McCormack <cam@mcc.id.au>, spec-prod <spec-prod@w3.org>
On Mar 14, 2012, at 16:29 , Philippe Le Hegaret wrote:
> On Wed, 2012-03-14 at 07:51 -0700, Tab Atkins Jr. wrote:
>> Here's something even simpler:
>>
>> <!doctype html>
>> <figure>
>> <svg>
>> <defs>
>> <foreignObject>
>> <img src="fallback.png" />
>> </foreignObject>
>> </defs>
>> ...real image here
>> </svg>
>> <figcaption>I'm an image!</figcaption>
>> </figure>
>>
>> In UAs that support SVG, the <img> will never be rendered. In UAs
>> that don't, you'll just get an <img> wrapped up in a bunch of unknown
>> inline elements.
>
> but if you have a text element in your SVG, that text node will be
> visible if the agent doesn't understand inline SVG, leading to messy
> text.
Untested, but wouldn't this help in some CSS?
@namespace svg "http://www.w3.org/2000/svg";
text { display: none; }
svg|text { display: initial; }
Also, are we considering having something like https://github.com/aFarkas/html5shiv available as a W3C resource so that we can reference it reliably without copying it for each spec?
--
Robin Berjon - http://berjon.com/ - @robinberjon
Received on Wednesday, 14 March 2012 20:04:02 UTC