You have probably been pointed to this page because you noticed when the barnstars and other kinds of talk page messages lost their centering, or their coffee-brown or grey colors. The reason these are no longer present is because the messagebox
and standard-talk
classes have been removed from MediaWiki:Common.css.
This page provides a quick and dirty "replacement" for those styles if you wish to correct your user page or user talk pages.
Replacement, alternative 1
editReplacement, alternative 2
editWhether you have a table (a messagebox that starts with {|
) or a div (a messagebox that starts with <div
), the replacement is essentially the same. For <div> solutions, you may need to check when you're done that the opening div for the messagebox has been closed, i.e. that there is a >
character at the end of the tag.
Case | Example page text | Example replacement text |
---|---|---|
Simple messagebox table (1) | {| class="messagebox"
|
{| style="border: 1px solid #a2a9b1; background-color: #f8f9fa; width: 80%; margin: 0 auto 1em; padding: 0.2em;"
|
Messagebox table with style (2) | {| class="messagebox" style="background: #fff"
|
{| style="border: 1px solid #a2a9b1; background-color: #f8f9fa; width: 80%; margin: 0 auto 1em; padding: 0.2em; background: #fff"
|
Simple standard-talk messagebox table (3) | {| class="messagebox standard-talk"
|
{| style="border: 1px solid #c0c090; background-color: #f8eaba; width: 80%; margin: 4px auto; padding: .2em;"
|
standard-talk messagebox table with style (4) | {| class="messagebox standard-talk" style="background: #fff"
|
{| style="border: 1px solid #c0c090; background-color: #f8eaba; width: 80%; margin: 4px auto; padding: .2em; background: #fff"
|
For cases 2 and 4, note that the old styles go before, not after, the styles that were in the template previously. You are not required to remove the previous classes, but they do not serve any particular utility any longer.
A messagebox today looks something like this:
And a standard-talk messagebox today looks something like this:
If you don't end up with a box similar to these, either a) there were styles in the messagebox already as in cases 2 and 4, or b) you copy-pasted the wrong line.
Background
editThe reason these were removed is because we are trying to move to TemplateStyles (see MediaWiki talk:Common.css/to do#description). These classes, however, have a full replacement in the form of {{ombox}} and {{tmbox}} (and in other non-standard cases, "hand-coded" tables/divs).
While we have done our best to remove the vast majority of uses that are "public facing" and not archived discussions/unused WikiProjects (see MediaWiki talk:Common.css/to do#messagebox), there are still 120 thousand uses on user and user talk pages. These uses are mostly WikiProject invitations and barnstars. The effects of not updating (these styles provide a width, centering, and background) are not deleterious to the page content, but the pages might not be as pretty as you might prefer. A brief discussion was held about the topic, where there was general silence as to how to deal with these pages. This guide is an attempt to provide users who would like their pages to be like they used to be.