Re: CSS3 Generated Content Draft questions/comments.

* James Craig wrote:
>Also, unless I'm missing something, there is an error in the 'quotes' 
>example.
>
>   :lang(en) > q
>
> From selectoracle: "Selects any q element that is a child of any 
>element which is in a language or locale whose identifier equals en or 
>begins with en-."
>
>Wouldn't this selector be better/accurate as the given markup example 
>has 'q' as a descendant of the <HTML> but not a child?
>
>   :lang(en) q

Elements inherit their parent's language if no language is specified.
Consider this document:

  <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <title>...</title>
      <style type = 'text/css'>
      </style>
    </head>
    <body xml:lang='en'>
      <p xml:lang='de'><q>...</q></p>
    </body>
  </html>

The q element is matched by ":lang(en) q" but not by ":lang(en) > q".
For the actual example it doesn't make a difference which selector is
used, but I don't see why using the descendant combinator is any better
than using the child combinator.

Received on Thursday, 3 July 2003 20:36:03 UTC