W3C home > Mailing lists > Public > www-svg@w3.org > August 2010

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

From: Kevin Ar18 <kevinar18@hotmail.com>
Date: Thu, 19 Aug 2010 16:14:55 -0400
Message-ID: <SNT110-W55223448FD126429D6C2E0AA9E0@phx.gbl>
To: <www-svg@w3.org>

> Jeff wrote:
> JS> Those properties are not applicable to SVG elements. See the
> JS> list of CSS properties that can be applied to SVG elements here:
> JS> http://www.w3.org/TR/2010/WD-SVG11-20100622/styling.html#SVGStylingProperties
> KA> That is what I thought. However, the problem area is putting
> KA> the svg tag inside an html5 document. You can then apply
> KA> background-color, borders, etc....
> I believe you are mixing up "set on" and "apply to".
> Properties can be *set* on any element:
> body, p, svg, g, circle { border: thick solid green }
> Whether that property *applies to* a given element is a different matter. For example, the properties which affect the CSS box model (like border, background, etc) don't apply to elements which are not rendered using a box model.
Doesn't the svg element inserted into an HTML5 document follow the box model to some extent?
Meaning, when included in an HTML5 document, it would be vaild for border and background to apply to the topmost svg element?
... and if so, wouldn't it confuse the handling of pointer-events -- since pointer events only apply to graphical elements (which svg is not)... but by applying a background you are suddenly making the svg element graphical (with, perhaps, unclear behavior)? 		 	   		  
Received on Thursday, 19 August 2010 20:15:28 UTC

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