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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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