yahoo/mojito-shaker — pull request #32 by jamesalley (2012-10-05 00:40:23+00:00)
Title: nojs enhancement

This enhancement adds 6 bytes to the payload, but it's worth it. It allows a dev to assign base styles for both js and nojs cases.

Consider an menu that appears in response to a click (not hover!), but for which we desire to have a :hover fallback behavior for those with javascript off.

.menu { display: none }
.js .menu.active { display: block }
.nojs .menuTrigger:hover .menu { display: block }

WIthout the .nojs flag, one would have to write:

.menu { display: none }
.menuTrigger:hover .menu { display: block }

/* to prevent showing the menu on hover in the js case */
.js .menuTrigger:hover .menu { display: none }

.js .menuTrigger:hover .menu.active { display: block }

That's more verbose and less clear. It's just one example of why it's good to have an initial "nojs" flag.

Thanks Diego!