amcss / attribute-module-specification

The Attribute-Module CSS (AMCSS) Specification
MIT License
393 stars 8 forks source link

Expand spec to include Javascript triggers #16

Closed marklawlor closed 10 years ago

marklawlor commented 10 years ago

CSS classes are not only used for element styles but also to trigger JavaScript functionality.

Should the spec be expanded to include a new concept for Javascript triggers? A possible name could be 'Actions'

An example:

<a am-Button='large rounded' am-MyModal='click:openModal'>Large rounded button</a>
marklawlor commented 10 years ago

Actually this would be a bad idea as amcss's goal is to promote more modularity in a sites CSS and this does not aid in reaching that goal. Traditional CSS classes should still be used or your own custom attribute.