This was an oversight on my part: I assumed that there were more
constraints on the "an+b" syntax than there actually were.  Reading
over the spec once again I see this...

"The :nth-child(an+b) pseudo-class notation represents an element that
has an+b-1 siblings before it in the document tree, for a given
positive integer or zero value of n."

...which makes the "an+b" logic simpler than I originally thought it
was.  I'll fix this over the weekend in order to get it into 1.5.1
final.  Thanks!

Cheers,
Andrew

On Mar 16, 3:25 am, Christophe Porteneuve <[EMAIL PROTECTED]> wrote:
> Hey Trevan,
>
> Trevan Richins a écrit :
>
> > The new version of $$() is wonderful but doesn't seem to work all that
> > well with the :nth psuedo-elements.  It looks to only work correctly
> > when in the formula "an+b", "a" and "b" are positive and "b" < "a".  I
> > don't know if anyone has noticed this yet, but I couldn't find a bug id
> > so I filled a new one and added a possible fix for it (as well as test
> > cases).  The bug is at:http://dev.rubyonrails.org/ticket/7841.
>
> Thanks for the heads up.  It's possible, due to the code's "freshness,"
> that there are still bugs.  The negative values, in particular, are very
> likely not handled, although I'm surprised about the b < a thing.  I
> (and Andrew, no doubt) will look into it ASAP.
>
> As a small note, $$ does not implement any pseudo-element, but
> pseudo-classes.  "Pseudo-elements," as their name implies, do not select
> *elements*.  They select fragments, or sometimes as-yet-empty locations
> (:first-letter, :first-line, :before, :after, :selection).
>
> --
> Christophe Porteneuve a.k.a. TDD
> "[They] did not know it was impossible, so they did it." --Mark Twain
> Email: [EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to