W3C home > Mailing lists > Public > www-style@w3.org > January 2007

RE: Definition of a replaced element

From: Peter Sorotokin <psorotok@adobe.com>
Date: Wed, 17 Jan 2007 10:16:39 -0800
Message-ID: <40CE68F1F8CAFB48B998C328517EA92A014B668F@namail2.corp.adobe.com>
To: "Martijn" <martijn.martijn@gmail.com>
Cc: "www-style" <www-style@w3.org>

Martijn,

You are correct and in your example object is not a replaced element.

CSS spec defines the box model which is a set of rules for the placement
of the content on the screen (or some other visual media). My reading of
the spec is that replaced elements are elements that participate in
their parent box layout, but do not lay out their content by the box
model rules. A CSS formatter (seems like not a universally accepted
term) is simply a "device" (normally, a software module) that implements
CSS box model for the given document. So the replaced elements
themselves ARE under the control of the CSS formatter, but their content
is not.

Peter

-----Original Message-----
From: Martijn [mailto:martijn.martijn@gmail.com] 
Sent: Wednesday, January 17, 2007 6:13 AM
To: Peter Sorotokin
Cc: www-style
Subject: Re: Definition of a replaced element

On 1/3/07, Peter Sorotokin <psorotok@adobe.com> wrote:
> I think it is pretty clear from CSS spec that svg is a replaced
element,
> because its content is not rendered by CSS formatter. Element's box
> itself, of course, is under the control of the formatter, but that is
no
> different for an img or object elements. Perhaps, listing svg element
as
> an example of a replaced element would be good.

So <object> isn't a replaced element in this example when svg is not
supported?
<object data="test.svg" type="image/svg+xml"><span
style="display:block;">text</span></object>

When the content of an element isn't rendered by the CSS formatter,
then it automatically means it is a replaced element then?

> Definition of the rendered content does seem to be too narrow to me.

So that text needs to be changed then, right?

I'm trying to find a definition of what a CSS formatter is, where can
I find more information about this term?

Regards,
Martijn

> Peter
>
> -----Original Message-----
> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On
> Behalf Of Martijn
> Sent: Wednesday, January 03, 2007 4:24 AM
> To: www-style
> Subject: Definition of a replaced element
>
>
> I was reading this mail thread:
> http://lists.w3.org/Archives/Public/www-svg/2007Jan/0001.html
>
> And it was mentioned that <svg> was a replaced element.
>
> When I look at the definition of a replaced element:
> http://www.w3.org/TR/CSS21/conform.html#replaced-element
> Apparently this applies to the <svg> element, right?
> "An element that is outside the scope of the CSS formatter"
> So the content of an <svg> element is outside the scope of the CSS
> formatter?
> Wat is exactly is the CSS formatter?
>
> Definition of Rendered content:
> http://www.w3.org/TR/CSS21/conform.html#rendered-content
> "The rendered content of a replaced element comes from outside the
> source document"
> That seems to be not the case for the <svg> element, or am I
> misreading this in some way?
>
> Regards,
> Martijn
>
>
> --
> Martijn Wargers
> Help Mozilla!
> http://weblogs.mozillazine.org/qa/
> http://www.mozilla.org/contribute/
>
>


-- 
Martijn Wargers
Help Mozilla!
http://weblogs.mozillazine.org/qa/
http://www.mozilla.org/contribute/
Received on Wednesday, 17 January 2007 18:17:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:49 GMT