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

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

From: Chris Lilley <chris@w3.org>
Date: Thu, 19 Aug 2010 19:40:42 +0200
Message-ID: <14010144215.20100819194042@w3.org>
To: Kevin Ar18 <kevinar18@hotmail.com>
CC: www-svg@w3.org
On Wednesday, August 18, 2010, 11:34:31 PM, Kevin wrote:

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.

 Chris Lilley   Technical Director, Interaction Domain                 
 W3C Graphics Activity Lead, Fonts Activity Lead
 Co-Chair, W3C Hypertext CG
 Member, CSS, WebFonts, SVG Working Groups
Received on Thursday, 19 August 2010 18:55:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:27 UTC