RE: How does the svg element handle CSS border and background-color?

> > I'm not sure if it is a spec issue or a misunderstanding, but the
> > browsers can't seem to agree on whether the svg element should act like
> > an invisible blocking layer to content underneath. Opera thinks it
> > should not block content underneat or dispatch events when using
> > position:absolute; but that it should trigger events when inline.
> > Firefox, thinks the svg element should act like an invisible layer
> > blocking access to items underneath. [...]
> >
> > Maybe this issue has nothing to do with html; maybe it needs some
> > clarification in CSS instead.
>
> This sounds like something that should be defined in SVG and/or DOM Events
> (assuming you mean "blocking" for the purposes of mouse clicks), not in
> HTML. The same problem would occur without HTML being involved at all,
> e.g. if you just had a random XML element styled with CSS which then had
> SVG inside it.

To make a long story short, SVG does define that the svg element CANNOT "dispatch" an event because it is non-graphical (in indirect terms).
 
However, when you apply CSS properties to the SVG element, you can turn the non-graphical element into a graphical one by adding borders, background-image, etc....  Technically, these CSS properties are not supposed to be possible for the svg element (according to the SVG spec).
 
 
Do you think the SVG spec should have a defined behavior for all of the properties in the CSS spec?  (This could get messy trying to keep up with each new CSS spec.)
 
Note: I also asked about an alternative solution (albeit maybe a very bad one):
http://lists.w3.org/Archives/Public/public-fx//2010JulSep/0066.html 		 	   		  

Received on Tuesday, 24 August 2010 00:52:12 UTC