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

Re: Opera's Proposal for :context Selector

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Mon, 14 Jul 2008 11:08:28 -0700
Message-ID: <487B961C.3090104@terrainformatica.com>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
CC: www-style <www-style@w3.org>

Lachlan Hunt wrote:
>
> Andrew Fedoniouk wrote:
>> If your goal to implement scoped lookup then your
>>
>> :context/:scope elements are *mutually exclusive* with the :root.
>>
>> Either one shall appear in the selector. Appearance of both will
>> make selector always invalid. With only one obvious exception.
>
> What?  I do not understand how you have reached that incorrect 
> conclusion.  You seem to be a little confused.
Ok, let's make another round.

Could you give clear answers to following questions:

For the markup:
  <body>
    <div>
        <p id="scope"><span>FOO</span></p>
    <div>
  </body>

and code:

  var scope = document.getElementById("scope");
  var test1 = scope.querySelector("div span");
  var test2 = jQuery.find("div span");

1) What is expected value of test1? null or reference to the span element?
2) Do you expect results in test1 and test2 to be different?

3) If you have scoped style sheet applied to <p id="scope"> in some form 
then what would be
a result of applying following style sheet:

/*style set for the p#scope */
<style root="p#scope">
  span { color:green; }
  div span { color:red; }
</style>

What would be the color of text FOO?

Answers on this questions will help to understand your goals and lookup 
mechanism you imply.
So far it seems like we are speaking about completely different things, 
goals and libraries.

--
Andrew Fedoniouk.

http://terrainformatica.com
Received on Monday, 14 July 2008 18:09:21 GMT

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