Last modified: 2012-07-22 00:45:57 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 T40375, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38375 - Monobook main.css incomplete, which makes modification difficult
Monobook main.css incomplete, which makes modification difficult
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
Other (Other open bugs)
REL1_19-branch
All All
: Unprioritized minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-13 12:52 UTC by Yora
Modified: 2012-07-22 00:45 UTC (History)
2 users (show)

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


Attachments

Description Yora 2012-07-13 12:52:19 UTC
In the 1.19.1 release, the main.css for the Monobook skin is missing lines that are important to change colors.

For example, the 1.16 release had the lines

h1, h2, h3, h4, h5, h6 {
	color: #A67C52;
	background: none;
	font-weight: normal;
	margin: 0;
	overflow: hidden;
	padding-top: .5em;
	padding-bottom: .17em;
	border-bottom: 1px solid #aaa;
}

which allow users to set heading colors for a color changed version of Monobook, or to override colors in the MediaWiki:Monobook.css page. These lines are not included in the main.css of the 1.19.1 release, which makes it impossible to change heading colors by modifiying a copy of the main.css. I was only able to solve this for my own site by going through the backup that still had the 1.16 main.css.

I suggest that all main.css files should include all neccessary lines to change color, size, and fonts of all elements of the skin.
Comment 1 Alex Monk 2012-07-13 15:25:12 UTC
What extension is this? And why is it so difficult for you to just add the relevant lines?
Comment 2 Krinkle 2012-07-22 00:45:57 UTC
Loading of resources in MediaWiki is done through the concept of modules.

A module can contain more than 1 file. For example the "skins.monobook" module contains the following files:
>
>		'styles' => array(
>			'common/commonElements.css' => array( 'media' => 'screen' ),
>			'common/commonContent.css' => array( 'media' => 'screen' ),
>			'common/commonInterface.css' => array( 'media' => 'screen' ),
>			'monobook/main.css' => array( 'media' => 'screen' ),
>		),

Please do not link to refer to internal mediawiki files directly. Instead load the module as a whole by its canonical name ("skins.monobook" in this case). Files can be renamed or moved between versions of MediaWiki, but the module name will not.

To learn how to load a module, see:

https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader#Loading_module

Also, don't copy or modify internal files as a whole. If you copy all of main.css to your wiki's MediaWiki:Monobook.css page you cause all css to be loaded twice. This is both inefficient and causes the styles to be outdated. And when you upgrade to the next version you might end up with a broken-looking wiki because you still have old styles - even styles you didn't want to change - and then a result have effectively changed.

Instead keep your MediaWiki:Monobook.css clean with only styles you intent to override from the default styles.

Don't worry about where the files are in MediaWiki core, the software takes care of that. The css wasn't removed in 1.19.1, they were just renamed and moved somewhere else.

So if you want to override the color of headings, adding the following to MediaWiki:Monobook.css will work just fine:
> h1, h2, h3, h4, h5, h6 {
>   color: green;
> }

Marking this bug as 'invalid', because it is not a bug in the software. If you need further assistance feel just leave a comment below and we'll answer :)

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


Navigation
Links