Andrew Dupont a écrit : > That bothers me because simply querying '#story p:first-letter' > modifies the document. $$ is a mechanism for reading nodes, not > modifying them, so I think the confusion this would cause would > outweigh any syntactic elegance.
That's very much my view, too. Plus, the suggested implementation will add a new <span> layer *every time*. It is clear that creating a span in there could result in dramatic unexpected changes due to styling. This is the whole point of pseudo-elements: they're named that way because they refer to things that are *not* DOM elements (as opposed to pseudo-classes, which refer to DOM elements satisfying specific state/structural criteria). I also think we're very much on an edge case here: if you intend to manipulate first letters/words by script, you could very much wrap them in a span originally (e.g. wherever the page's XHTML is generated), CSS around it, etc. -- 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 firstname.lastname@example.org 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 -~----------~----~----~----~------~----~------~--~---