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

Re: Opera's Proposal for :context Selector

From: Maciej Stachowiak <mjs@apple.com>
Date: Mon, 14 Jul 2008 11:43:19 -0700
Cc: www-style <www-style@w3.org>
Message-Id: <7780E6EF-D0A1-4665-80C6-492427011DD0@apple.com>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>

On Jul 10, 2008, at 4:02 PM, Lachlan Hunt wrote:

> Maciej Stachowiak wrote:
>> On Jul 10, 2008, at 1:03 PM, Lachlan Hunt wrote:
>>> http://lists.w3.org/Archives/Public/www-archive/2008Jul/att-0019/Overview.html
>> Previously this pseudo-class has been suggested as :scope. Why the  
>> change to :context? (I'm not saying I disagree, just curious.)
> I just thought it was a better name than :scope.  I'm not overly  
> attached to it, it could be called anything.  But I'd rather not  
> spark another naming debate, since, as you know, they rarely go down  
> well.

Well, at the risk of potentially starting a naming debate bikeshed,  
here are a few arguments for :scope instead of :context. I don't feel  
too strongly about these

1) HTML5 has <style scoped>, it is easier to remember "use :scope for  
<style scoped>" than "use :context for <style scoped>".

2) It's been proposed for a future version of Selectors API to  
introduce a notion of "scoped selector" which better matches the  
behavior of JavaScript library selector APIs, namely behaving as if  
every selector in the group had :scope/:context prepended, and even  
allowing selectors to start with a bare binary combinator, such as ">  
b" to select all <b> children of the scope/context node. Again, it  
would be easier to remember the relationship with aligned names.

3) Typically in computer science terminology, "scope" is a more  
specific term than "context". "Scope" implies containment, while  
"context" can mean any auxiliary information that can affect the  
behavior of operations. While either would be applicable here, I think  
"scope" is more precise, since in all the uses we envision the scope  
node will contain all of the potential result nodes.

I won't argue this into the ground, but I think these are somewhat  
good reasons to keep the name at the previously proposed :scope.

Received on Monday, 14 July 2008 18:44:32 UTC

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