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

Re: [css3-selectors][css-selectors] ::first-line pseudo-element badly underspecified

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Tue, 31 Jan 2006 14:10:31 -0600
Message-ID: <43DFC437.4090808@mit.edu>
To: Ian Hickson <ian@hixie.ch>
CC: www-style Mailing List <www-style@w3.org>
Please disregard my previous response, since I forgot to attach the testcases...

Ian Hickson wrote:
> It apparently is. For any common case, browsers behave interoperably, and for
> obscure cases, the differences (where they aren't in conflict with the spec)
> are mostly of academic interest and don't represent issues that would be 
> considered problems by authors or users.

I disagree with this assessment of the situation, frankly.  See more below.

>> This is likely to require interesting changes to existing CSS engines, 
>> since it violates the existing invariant that you have a unique parent you 
>> inherit from.
> This has never been an invariant, ever since CSS1 introduced :first-line and 
> let an element have two colours (one for one part and one for the next line's
> part).

In CSS1 this could be done by simply having separate style information for the
two parts and having one inherit from the first-line and the other inherit from
the parent.

Note that I didn't say you have a unique parent per _element_; you have a unique
parent per set of style information.  In CSS1.

> We agree that the 'inherit' keyword made things more complex

Significantly.

> but only because it lets you inherit certain properties that you couldn't 
> otherwise, and that's what we're saying should be cut off.

Ok.  Like I said, this would make sense to me.

>> I strongly suspect you wouldn't end up with two interoperable 
>> implementations of this, but I'm happy to be proved wrong, I guess.
> 
> Well, it seems we already have more than two that do this.
> 
> Could you provide us with some test cases that show what you find to not be 
> interoperable?


In what follows, "the proposal" refers to the proposal that different properties
inherit from different places (the one you suggested).

See attached testcase for a simple example.  Gecko and Opera are not
interoperable on the second test (and in fact what Gecko does is not very
sensical).  Neither Gecko nor Opera implements the proposal for background-color
(see first test), but they're interoperable with each other in terms of where
background is inherited from.  They're not interoperable in terms of where the
bounds of the first line are.

I don't have a current khtml on hand, but Konqueror 3.3 is interoperable with
Gecko's nonsensical rendering on the second test but not with Gecko or Opera on
the first test (so it implements the proposal for background-color, apparently,
but not for display, which is the opposite of Opera).

Test 3 shows that even apart from this discussion about inheritance there is not
so much interoperability for the very simple case of background being set.  In
fact, the three UAs have three different renderings here.  Since setting of
background is one of the primary use cases of ::first-line, I disagree that UAs
are interoperable in the common cases.

> As mentioned above, I do not think it has ever been simple. This has been the
> case since CSS1.

As I believe I've explained, this was in fact not an issue in CSS1.

-Boris


Received on Tuesday, 31 January 2006 20:10:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:42 GMT