Last modified: 2014-09-23 21:49:11 UTC
This would allow a stylesheet to apply to only a particular book. Important mostly for the Wikijunior project, but would be useful as well for any Wikibooks. Should also allow per-book javascript.
Sounds you you would want some tag that would enable you to set which .css in the MediaWiki: namespace should be used. Is that what you mean?
Yes, that sounds like exactly what they are talking about. The ability to switch .CSS files (and possibly .JS files too!) depending on the name of the book.
Hello! Wouldn't be a better approach to have CSS and JS per *categories*? Then, since all pages of a wikibook is usually in the category with the name of the book, the CSS would be applied without having to tag each page of the books. Using categories, this would also be useful for Wikipedia, because it is common to have all pages from a category sharing the same style, mainly by means of the templates/infoboxes ([[Category:Wikipedia template categories]] and [[Category:Infobox templates]]); The same would be great for javascript, because if we could load a script only if the page is at some category we would be able to load a script which is useful only for some pages exactly on those pages, not in every one. For example, not every page has a sortable table ([[Help:Sorting]]) or a collapsible content ([[Help:Collapsing]] and [[Wikipedia:NavFrame]]), but such scripts are loaded for all pages (NavFrame and Collapsible tables are at [[MediaWiki:Common.js]] and sortable tables at http://en.wikipedia.org/skins-1.5/common/wikibits.js). This also happens in other projects then Wikipedia. Maybe this could be at [[Category:Name of category.css]] and [[Category:Name of category.js]], similar to what we have for user scripts/css. Helder
By the way, there are other situations where per category scripts would be useful, and I just find another: Currently, [[MediaWiki:Common.js]] has a script which "Adds editintros on disambiguation pages and BLP pages." It load EditIntros according to the categories the articles belongs to... Helder
See also the option mentioned in bug 2212#c9.
This bug was mentioned recently in a wikitech thread about inline stylesheets: http://www.gossamer-threads.com/lists/wiki/wikitech/282115#282115 http://www.gossamer-threads.com/lists/wiki/wikitech/278870#278870 https://www.mediawiki.org/wiki/Deprecating_inline_styles
This is about page rendering and the load queue of scripts (which eventually end up loaded with ResourceLoader). About as related to ResourceLoader as it is to Apache (which delivers the code eventually).