Page MenuHomePhabricator

Mediawiki:Geshi.css imported multiple times
Closed, ResolvedPublic

Description

Mediawiki:Geshi.css is imported multiple times, once for each language. This is a bit messy when you debug your own CSS with e.g. Web Developer Toolbar and have to go through many CSS files with the same content until you find your code.


Version: unspecified
Severity: minor
URL: http://en.wikipedia.org/wiki/Hello_world_program_examples

Details

Reference
bz26860

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:19 PM
bzimport added a project: SyntaxHighlight.
bzimport set Reference to bz26860.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 8018
Partial patch; see comment for issues with ordering

It's relatively easy to split the style blocks into separate head items for the language-specific styles and the site-specific overrides, which would let OutputPage automatically sort out the dupes and only actually output one instance of the including of MediaWiki:Geshi.css

*However*... there's a catch. :) The purpose of the customizable styles is to allow people to override the GeSHi default styles; to accomplish this it must be included *after* all the default style blocks.

If we make it its own separate head item, it'll get included after the first language style block, but *before* any subsequent ones. Custom styles with the same selector priority as those in the default styles could get overridden back to the defaults, and not be very easy to debug -- especially since most of the time there'll probably only be a single language per page and the bug won't bee seen.

(!important entries can force an override, but folks likely won't know they need it.)

If it can be pushed down below later invocations of the plugin, then it'll do the job.

Attached:

Looks indirect fixed by now using the resourceloader (bug 27714)?

Michael / Brion: Was this fixed by using resourceloader (bug 27714)?

Michael / Brion: Was this fixed by using resourceloader (bug 27714)?

As far as I can tell, using the page listed in the URL, ext.geshi.local only appears once. If anyone else wants to confirm this, or has a better way of testing/checking it, please do!