Re: !CSS2WD ERROR! in pseudo-element rules

Bert Bos wrote:

>  > On a related note, look at the following rule
>  >    P EM, P:first-line    { font-style: italic; }
>  > and imagine what would happen to the following text:
>  >    <P>This is <EM>the</EM> first line of text.</P>
>  > The emphasised "the" would not be emphasised! What we need is
>  >    P:first-line EM       { font-style: normal; }
>  > but according to the last line of the selectors page (4) it is wrong,
>  > because "Pseudo-elements must be specified at the end of a selector". Again,
>  > I don't really understand the reasoning in this.
> 
> Yes, I agree there are useful cases, but on the whole this leads to
> so many difficulties (in the specification as well as in the
> implementations) that we think this is not in the scope of CSS.

I agree 100% with Bert about difficulties. A bit less about scope ;-)

possible problems :

1. In the quoted example, nothing tells us that the EM is *completely*
included in P:first-line for instance....

2. pseudo-elements list may be extended in the future and promoting
pseudos as normal elements in selectors could be a terrible problem.


</Daniel>

Received on Wednesday, 25 February 1998 03:20:06 UTC