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

Re: [selectors] [css3-content] The ::inside pseudo-element

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 20 Jan 2009 14:59:21 -0500
Message-ID: <49762D19.3060903@mit.edu>
To: Giovanni Campagna <scampa.giovanni@gmail.com>
CC: www-style@w3.org

Giovanni Campagna wrote:
>     I'm not sure what you mean here.  How is this case different from,
>     say, absolute positioning?  ::before works just fine with absolute
>     positioning: the before content is placed inside the positioned box.
> That's what I mean: shouldn't the ::before be left in the normal float 
> and the DOM content positioned (this is a behaviour I saw in many 
> examples around the web, although never tested)

Not as currently defined, no.

>         the example in the same spec, section 4.2
>     Er... why does it break that example, exactly?
> The example says that ::before applied a to a table-row elements creates 
> a new table cell (display: table-cell)

No, the example says, and I quote:

   "An anonymous table cell box is generated around the '::before'
    content in this case, resulting in a 32 table."

This happens because you have a "display:inline" child inside a 
"display:table-row" parent, and then CSS2.1 section 17.2.1 then applies. 
  Specifically, item 7 in that section.

> instead it creates a new inline 
> box (to notice this fact, try adding and removing "display: table-cell;" 
> to added content)

That shouldn't affect the rendering in this case, generally speaking. 
It certainly doesn't over here (tested with a recent Firefox and Opera).

Received on Tuesday, 20 January 2009 20:00:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:23 UTC