W3C home > Mailing lists > Public > www-style@w3.org > March 2008

Re: [css2.1] :first-line behvior

From: Brad Kemper <brkemper@comcast.net>
Date: Thu, 20 Mar 2008 08:46:15 -0700
Message-Id: <2DFB579D-391F-4731-A2B8-888FC85C9CF0@comcast.net>
Cc: Bruce Lawson <bruce@brucelawson.co.uk>, www-style@w3.org
To: fantasai <fantasai.lists@inkedblade.net>

On Mar 20, 2008, at 8:15 AM, fantasai wrote:

> Brad Kemper wrote:
>> On Mar 19, 2008, at 1:40 PM, fantasai wrote:
>>> Bruce Lawson wrote:
>>>> At 19:16 19/03/2008, David Hyatt wrote:
>>>>> http://www.w3.org/TR/CSS21/selector.html#pseudo-elements
>>>>> "Pseudo-classes are allowed anywhere in selectors while pseudo-  
>>>>> elements may only be appended after the last simple selector of  
>>>>> the
>>>>> selector."
>>>> I've seen this before, and often wondered: why?
>>> <p>This is a one-sentence <em>paragraph that
>>> has two lines</em> of text.</p>
>>> p::first-line em { display: block; }
>>> is one reason I can think of.
>> Nope, that's not a good enough reason, but nice try. The pseudo- 
>> elements define what properties are applicable to them, and for  
>> "first-line" it does not include "display"
> The rule there doesn't select :first-line, though, it selects an  
> 'em' element.
> ~fantasai

True... but it's a bit of circular reasoning to say that the reason  
the spec doesn't allow pseudo-element descendant selectors is because  
the spec doesn't say which type of properties are allowed on pseudo- 
element descendant selectors. Naturally the spec won't say anything  
about which properties are allowed on selectors that are not allowed.

Would you see anything wrong with allowing those selectors if the  
note about which properties are applicable was extended slightly to  
say that these were also the properties that could be used in the  
pseudo-element's descendant selectors? I was assuming that was  
implied before I realized the restriction on trying to select  
descendants of pseudo-elements.
Received on Thursday, 20 March 2008 15:47:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:35 UTC