Last modified: 2006-10-20 03:29:44 UTC
Monobook puts a CSS ID in the BODY to tell us what namespace we're in, but "Main page" is a kind of special page in the main namespace, and sometimes we don't want CSS to affect it in the same way as an article page. Currently Javascript is required to detect if the current page is "Main page", and even that will not be portable when "Main page" has another name.
Created attachment 1796 [details] Set body id attribute to page name The attached patch sets the "id" attribute of the HTML "body" tag to the page title (escaped in the same manner as section anchors). This enables the creation of CSS rules that only apply to the main page, _or_ to any other given page, like this: BODY#Main_Page H1 { display: hidden; } /* hide title on main page */
Added in r17119 based on Ilmari's patch, see also r17120. Added as a class instead of an id, for more flexibility in character choice (Unicode is allowed in classes) and generally the purpose of the two. Prefixed with "page-" to avoid messy collisions.