W3C home > Mailing lists > Public > www-svg@w3.org > February 2012

Re: display:none and mixed SVG and HTML

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 02 Feb 2012 07:59:12 -0500
Message-ID: <4F2A88A0.9040106@mit.edu>
To: www-svg@w3.org
On 2/2/12 5:13 AM, Tab Atkins Jr. wrote:
> For two, "<p style=display:none><img id=foo></p>" will still draw the
> image when you reference it with the element() function from CSS.
> (This is currently only implemented in Firefox, as I specced it after
> they revealed an experimental implementation.)  It's not perfect quite
> yet - for example, if the image was an animated GIF, only the first
> frame will show in the above example (while it would be animated if
> the image was visible).  That can be considered a bug, though.  This
> is basically identical to the situation you're talking about, though -
> if, instead of<img>, I had<svg><pattern /></svg>, I should be able
> to reference it just the same.

There are some significant differences.  Rendering an image does not 
require style computation, while rendering SVG does.  The requirement 
that replacing <img> there with <svg> render the SVG would require that 
browsers compute styles on display:none subtrees, no?

Received on Thursday, 2 February 2012 12:59:40 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:27 UTC