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

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 3×2 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).

-Boris

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