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

2009/1/20 Boris Zbarsky <bzbarsky@mit.edu>

> Giovanni Campagna wrote:
>
>> Uhm... I probably misunderstood the spec: I always thought that
>> ::before/::after introduced a new element at the same nesting level.
>>
>
> You can test this with CSS2.1 implementations, for what it's worth. Some
> borders on the element with ::before applied should show what's going on.
>

I tested (I should have done it before, sorry...)

>
>  But how is this supposed to work when the ::before pseudo-element is
>> actually outside the element itself (because the element is moved, like in
>> footnotes)?
>>
>
> 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)


>  Generated Content Module says that initial for ::before/::after should
>>
> be inline, but that breaks
>
>> the example in the same spec, section 4.2
>>
>
> Er... why does it break that example, exactly?
>
> -Boris


The example says that ::before applied a to a table-row elements creates a
new table cell (display: table-cell), instead it creates a new inline box
(to notice this fact, try adding and removing "display: table-cell;" to
added content)

Giovanni

Received on Tuesday, 20 January 2009 19:51:15 UTC