ibm-dojo/dui — pull request #10 by wkeese (2013-09-02 13:58:19+00:00)
Title: CSS and theme loader

Here's some code I've been working on for widgets to specify and load their CSS, rather than applications having to load the CSS files manually. It seems to be working, although not tested extensively yet. The big missing piece is build support: for builds, the CSS should be inlined, just like widget templates.

The dui/css! plugin is low level; it's for loading individual CSS files, and corresponds to the other open source AMD CSS loaders, except simpler.

The dui/themes/load! plugin is higher level. It loads all the CSS for a particular widget, branching based on the user agent (ala dojox/mobile/deviceTheme.js) and LTR vs. RTL.

The easiest way to see it is to look at the ExampleWidget I added (see test_ExampleWidget.html).

cc @doughays-dojo @pruzand @cjolif