Re: Proposal

Sebastian,

I didn't actually look at your examples closely enough... They are not the
same...

.cars div.foreign.used p

would be the same, yes, but

.cars div.domestic.new.efficient p

Is not... I think part of it is just a typo on your part (you are missing
spaces) - but that would probably make you see a new question and maybe
answer it... Take another look. each of those selectors must match, thus,
.efficient is the subject which must match the element being filtered and
then processed as normal. See
https://developer.mozilla.org/en-US/docs/DOM/Element.mozMatchesSelector -
that's the idea, testing of those selectors use the same process.


On Mar 7, 2013 8:09 AM, "Sebastian Ferreyra" <sebastian@ferreyrapons.com.ar>
wrote:

> I like the idea though I have one question. While I can see the use for
> :allof, :noneof and :oneof, I'm not too sure what the difference is between:
>
> /* Style the cars that are foreign and used or domestic, new and effiecient. */
>
> .cars div:-hitch-anyof(.foreign .used, .domestic .new .efficient) p {
>
>     color: blue;
>
> }
>
>
> and
>
> /* Style the cars that are foreign and used or domestic, new and efficient. */
>
> .cars div.foreign.used p,
>
> .cars div.domestic.new.efficient p {
>
>     color: blue;
>
> }
>
>
> Is there a difference or it's just there for syntactic completeness?
>
>
> On Wed, Mar 6, 2013 at 10:44 PM, Brian Kardell <bkardell@gmail.com> wrote:
>
>> Hey Everyone,
>>
>> Recently I spoke to Tab Atkins after some things came up regarding adding
>> set based APIs in ECMA on a different list - clint and I drafted out an
>> idea way, way back with Hitchjs prior to all of this which proposed adding
>> rich logical combinators to CSS since rules always operate on a set of
>> matching nodes, it feels like a logical fit.  Tab seemed to agree that we
>> should post a proposal to the list.
>>
>> I've been putting it off for a few days since I've been busy and haven't
>> had time to get things in order.  I quickly wrote up this blog post which I
>> haven't publicized at all... In it I mention the Hitch based prollyfill.
>>  It's pretty unofficial and we have no formal draft, but since it's pretty
>> early goings I wanted to see if anyone wanted to comment on that before I
>> sent to www-style.
>>
>> What say you?
>>
>>
>> http://briankardell.wordpress.com/2013/03/07/logical-psuedo-selectors-a-proposal/
>>
>>
>> --
>> Brian Kardell :: @briankardell :: hitchjs.com
>>
>
>

Received on Thursday, 7 March 2013 16:18:42 UTC