Using classes it's not clear if it's there to style an element or to pass params to some js widget or whatever. When using custom attrs it's much clearer what's going on.

I couldn't disagree more. :)

class is there to 'subclass' elements. The W3C themselves say <http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2>:

"""The class attribute, on the other hand, assigns one or more class names to an element; the element may be said to belong to these classes. A class name may be shared by several element instances. The class attribute has several roles in HTML:

* As a style sheet selector (when an author wishes to assign style information to a set of elements).
    * For general purpose processing by user agents."""

This is exactly one of the reasons it's there for! Why go looking at (relatively) complicated things like namespaces when class works fine?
--
Lach
http://illuminosity.net/



Reply via email to