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:12:00 +0100
Message-ID: <65307430901201112u2d38f536p55f437af19f1b44c@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>, www-style@w3.org
Uhm... I probably misunderstood the spec: I always thought that
::before/::after introduced a new element at the same nesting level.
If ::before is actually what I called ::before-content, then ::inside is not
needed anymore. (You can use ::outside reversing the perspective)

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

Moreover, I imagined that, because ::before pseudo-el were actually before
element itself, they inherited display as initial value (so before a block
you get an other block, before an inline you get an inline, before a
table-row another table row). Generated Content Module says that initial for
::before/::after should be inline, but that breaks the example in the same
spec, section 4.2 (the example that I read too fast, without paying
attention that selector was applied to the row, not to the cell).

Sorry for wasted time,


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

> Giovanni Campagna wrote:
>> td::before {
>>    text-align: left;
>>    content: attr(my|currency,string);
>> }
>> td {
>>    text-align: ",";
>>    display:table-cell; /* from UA defaults */
>> }
>> but this approch has a limit: it introduces a new table cell
> Uh... it does?  It shouldn't.  Why does it?
> > that moves
>> all subsequent cells on the rigth, destroying the whole layout. What I
>> need is content before cell content, not before cell box itself.
> That's what ::before does, yes.  It inserts content inside the box, before
> its DOM children.
> -Boris
Received on Tuesday, 20 January 2009 19:14:46 UTC

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