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

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

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 21 Aug 2010 18:22:10 +0000 (UTC)
To: Tony Schreiner <tonyschr@microsoft.com>
cc: Kevin Ar18 <kevinar18@hotmail.com>, "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <Pine.LNX.4.64.1008211819100.20486@ps20323.dreamhostps.com>
On Thu, 19 Aug 2010, Tony Schreiner wrote:
>
> I strongly disagree with Jeff's interpretation of the spec. I have yet 
> to find the behavior clearly spelled out in any combination of specs but 
> the HTML5 spec says the following:
> 
> "The svg element from the SVG namespace falls into the embedded content, 
> phrasing content, and flow content categories for the purposes of the 
> content models in this specification."
> 
> Between this, working with our own CSS experts, and working from first 
> principles with the long-term future of SVG in mind, I've understood 
> this to mean that when an <svg> element is embedded in HTML5 or XHTML, 
> that outermost element does participate in the box model, and as such 
> CSS formatting such as backgrounds, borders, margin, and padding should 
> apply to that outermost SVG element, just like it would to a <div>, 
> <img>, <iframe> or any similar element.

The line you cite does not mean that. All it means is that for the 
purposes of document conformance -- something that only affects authors, 
validators, and editors (including contenteditable implementations), but 
does not affect in any way CSS rendering rules or parsing or anything like 
that -- the <svg> element falls into certain content model categories.

You should never need to read between the lines in the HTML spec; I've 
tried to make everything very explicit.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 21 August 2010 18:22:39 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:45 GMT