W3C home > Mailing lists > Public > www-style@w3.org > October 2004

Re: Box model: min-margin and max-margin, max-padding and min-padding

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sat, 02 Oct 2004 22:53:07 -0500
Message-ID: <415F77A3.70105@mit.edu>
To: Andrew Fedoniouk <news@terrainformatica.com>
CC: www style <www-style@w3.org>

Andrew Fedoniouk wrote:
> Sorry, Boris I was not clear enough.
> 
> Example:
> Let's say we have standalone paragraph with style
> 
> <body>
> <p style="display:table-cell">
> </body>
> 
> As per CSS [1] "display:table-cell" forces change of underlying DOM - UA
> *must* create table and row elements.

No, that's not true.

The UA must create table and table-row _boxes_.  These are purely display 
objects and are not attached to any DOM nodes.


> Example: for the HTML above shall following style selector be in effect for
> the paragraph?
> 
> body > p { color:red }

Absolutely, since the DOM is completely unaltered.  The parent of the <p> node 
is still the <body>.  There are four boxes around (block, table, table-row, 
table-cell), of which only two are associated with a DOM node.

> (p does not have body as a direct parent anymore, right?)

Sure it does.

> body > p { display:block; }
> body > p:hover { display:table-cell; }

That's fine.

> Shall UA clear remnants of anonymous cell application (table and row
> elements) when mouse will left such paragraph?

Yes.  (Mozilla gets this wrong currently, but it's on the "to fix" list.)

> And again: after switch into 'hover' state first rule will not be valid for
> the P anymore.

That's not true.  Again, the DOM is not changed.

-Boris
Received on Sunday, 3 October 2004 03:53:13 GMT

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