3 ms·
The alternative is a slew of loosely-coupled and opaque attributes (IDs and classes), especially where you're not sure if a particular class or ID is used for p
by ihsw 14y ago
The alternative is a slew of loosely-coupled and opaque attributes (IDs and classes), especially where you're not sure if a particular class or ID is used for presentation (CSS) or functionality (JS). How do you handle refactoring when you use some classes for JS and some for CSS?
With custom attributes there is no confusion, and although it goes completely against the separation of concerns and now your mark-up isn't completely declarative -- it's a necessary drawback.
- thatthatis 14y agoif you have functionality class/ID, do you really have separate concerns or do you just have moderate/loosely coupled concerns?
- likeclockwork 14y agoWhat about some kind of Hungarian notation for classes? pBlue bWidget? I've never done this, just wondering.