Hi all,
A new innovation in version 2.3 (in RC2 now) has particular benefits to Widget developers.
You can now set themed CSS requirements from within a template with the tag:
<% require themedCSS(MyCssFile) %>
Why is this so great?
To style your widget in previous versions you had to call Requirements::themedCSS. This had to happen from somewhere in the Widget class when a piece of viewable data was requested. Since you never know if some designer is going to modify your widget template, you really should have been calling this for every field.
Now you can just place that tag at the beginning of your Widget template (.SS) file and let SilverStripe do the hard work! It saves you time and should execute quicker.
Regards,
Hamish