The important things to note in this gist are:
app.html
The usage of the custom attribute hover-color
is <div hover-color="special-hover-class">
where special-hover-class
is
simply a css class that will be applied to all hover-color elements when the given element is hovered.
hover-color.js
This is the source code of the custom attribute itself, and is commented to explain what it does. Essentially, if the element
is hovered, the custom attribute sends out a message to tell all other hover color elements to change. When the mouse leaves
the element, a message is broadcast to tell them all to remove their class change.
styles.css
[hover-color]
selects all elements which have the custom attribute. The css classes are declared here for the various base
and hover styles.
main.js
The hover-color attribute was globalized and therefore does not need to be <require>
d later.