Page MenuHomePhabricator

Enable [[MediaWiki:GeSHi.css]]
Closed, ResolvedPublic


Author: cannon.danielc

With the addition of the new <source> tags, many objections have been raised about the angry fruit-salad often generated by them. This angry fruit-salad can be fixed in Common.css quite easily; however, due to the order of loading the stylesheets it requires the use of !important and clogs up the css pages making them unreadable. See for example this fix:

What I'd like to suggest is that a [[MediaWiki:GeSHi.css]] page be added that will take priority over the stylesheets loaded by the syntax hilighting, such that the colors used by them can be easily fixed and customized on a per-wiki basis. Should be a relatively simple implementation.

Version: 1.11.x
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:37 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz9951.
bzimport added a subscriber: Unknown Object (MLST).

Is there some hook whereby an extension can insert a CSS stylesheet into the processing chain? It would seem that a generic solution rather than a particular hack would be a better solution.

Oh, and should this bug be under "MediaWiki>Page Rendering" or some sub-category of "MediaWiki extensions" ?

Assuming it's using a style sheet, it'll use the same mechanism it already does, which is the thingy to add a header thingy.

I've changed it from 'GeSHi.css' to 'geshi.css'. This is more consistent with other behavior, and fixes the Special:Allmessages bug. r22308.

ayg wrote:

Uh, I know I should've commented earlier, but shouldn't the solution to this have been to load extension stylesheets *before* site-specific customization stylesheets? This seems like . . . a bad idea, to have separate custom stylesheets loaded for every single extension that wants them.

robchur wrote:

Updating summary to reflect the current issue; this is also a minor bug, since it prevents overriding the style effectively.

ayg wrote:

No, that's bug 10184. I reopened to propose we undo this specific feature, I guess, more than proposing a separate thing. But whatever. :D

The advantage of a separate entry is that it doesn't have to be loaded when you're *not* on a page using the extension.