Last modified: 2006-10-20 03:29:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T7795, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5795 - CSS class needed for "Main page"
CSS class needed for "Main page"
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-02 16:57 UTC by Andrew Dunbar
Modified: 2006-10-20 03:29 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Set body id attribute to page name (1.49 KB, patch)
2006-05-19 22:06 UTC, Ilmari Karonen
Details

Description Andrew Dunbar 2006-05-02 16:57:36 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.
Comment 1 Ilmari Karonen 2006-05-19 22:06:23 UTC
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 */
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-10-20 03:29:44 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links