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

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

From: Giovanni Campagna <scampa.giovanni@gmail.com>
Date: Tue, 20 Jan 2009 20:50:37 +0100
Message-ID: <65307430901201150i106e13bej9663b627e02dd3e6@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>, www-style@w3.org
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:15 GMT