2 ms·
Looks like we are almost in agreement, except that I see no reason to separate event handling from the overall style description. Of course, modifying the docum
by marcosdumay 12y ago
Looks like we are almost in agreement, except that I see no reason to separate event handling from the overall style description. Of course, modifying the document is out of the scope of styling rules, events handlers on that level must change only styling, nothing else.
What events bring (besides generalizing the :hover-like pseudo-selectors into something more powerfull) is better separation of concerns. Instead of your Javascript touching several elements styles, it generates an event, and you describe how to handle it at the styling sheet.