I'm loading some CSS files with i.e. <% require themedCSS(layout) %>in my main template (Page.ss). In several included layout templates (i.e. HomePage.ss) I load additional CSS files (i.e. require themedCSS(home)).
In the generated code css files are loaded in reversal order, i.e.
<link rel="stylesheet" type="text/css" href="http://localhost:8060/themes/mysite/css/home.css?m=1320227911" />
<link rel="stylesheet" type="text/css" href="http://localhost:8060/themes/mysite/css/layout.css?m=1320076828" />
Since i would prefer to overwrite the general css declarations in layout.css with the specific declarations in home.css, i need to change the order in which the CSS files are loaded.
// Note: you should use SS template require tags inside your templates
// instead of putting Requirements calls here. However these are
// included so that our older themes still work
so I don't know if this is deprecated and will be eliminated in future versions?
Currently i'm doing a workaround, passing Silverstripe CSS mechanics with i.e.:
Actually what you should be doing these days is using Requirements::combine_files() so you send as few CSS files as possible.
It's personal preference as to use either the PHP requirements api or the template one, personally I think that message in Page.php is wrong. Including it in the PHP code is often the best (or only way) to do it.