Re: Opera's Proposal for :context Selector

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 UTC