[Mediawiki-l] Re : howto include different page.css into one MediaWiki:CentralCSS.css page for organizing css cascade sheets?

HiddenId courriel_achevrier at yahoo.fr
Wed Mar 21 16:52:42 UTC 2012

Ok Krinkle.
Thank you for your highlights.
You are right: it may be more relevant to integrate my personal css structure, inside MediaWiki:Common.cssor MediaWiki:Vector.css pages.
It could be more aligned with the way mediawiki works.
Thank again for your kindly help.

 De : Krinkle <krinklemail at gmail.com>
À : HiddenId <courriel_achevrier at yahoo.fr> 
Cc : MediaWiki announcements and site admin list <mediawiki-l at lists.wikimedia.org> 
Envoyé le : Vendredi 9 mars 2012 1h09
Objet : Re: [Mediawiki-l] howto include different page.css into one MediaWiki:CentralCSS.css page for organizing css cascade sheets?

Yes, that's the cause.

The url given to @import must include a hostname

so for example if you have certain customizations for the Vector skin,
you could put them in: MediaWiki:Vector.css/Layout.css and from

@import url('http://example.org/w/index.php?title=MediaWiki:Vector.css/Layout.css&action=raw&ctype=text/css');

If your domain supports http and https, relative protocols are supported as well:
@import url('//example.org/w/index.php?title=MediaWiki:Vector.css/Layout.css&action=raw&ctype=text/css');

That'll work.

Aside from that, this is however a little ineffecient in that it makes multiple HTTP requests.
Why not just put everythign in MediaWiki:Vector.css (which is loaded by default).

-- Krinkle

On Mar 8, 2012, at 3:02 PM, HiddenId wrote:

Hi Krinkle.
>Thanks for your help.
>Unfortunatly, we are testing on a local installation. The wiki is not accessible.
>Does it mean, you have tested your method on a wiki using mediawiki engine, to change #p-personal CSS from common.css, or any other equivalent CSS monobook css placed in common.css, and you succeed in it ? And if so, as a consequence, you wander if something concerning our wiki installation avoid a normal processing, do you ?
>Here bellow, informations concerning the version.
>1. Version informations (from Special page Version)
>Installed software
>Product     Version
>MediaWiki     1.18.1
>PHP     5.3.2-1ubuntu4.14 (apache2handler)
>MySQL     5.1.41-3ubuntu12.10
>Installed extensions
>Language Selector     Language selector on every page, also for visitors     Daniel Kinzler
>Polyglot     Support for content in multiple languages in a single MediaWiki     Daniel Kinzler
>PrefSwitch (Version 0.1.2)    Allow users to switch sets of preferences     Trevor Parscal and Roan Kattouw
>Extension functions
>wfLanguageSelectorExtension and wfPolyglotExtension
>Parser extension tags
><gallery>, <languageselector>, <nowiki> and <pre>
>Parser function
>anchorencode, basepagename, basepagenamee, canonicalurl, canonicalurle, defaultsort, displaytitle, filepath, formatdate, formatnum, fullpagename, fullpagenamee, fullurl, fullurle, gender, grammar, int, language, lc, lcfirst, localurl, localurle, namespace, namespacee, ns, nse, numberingroup, numberofactiveusers, numberofadmins, numberofarticles, numberofedits, numberoffiles, numberofpages, numberofusers, numberofviews, padleft, padright, pagename, pagenamee, pagesincategory, pagesize, plural, protectionlevel, special, subjectpagename, subjectpagenamee, subjectspace, subjectspacee, subpagename, subpagenamee, tag, talkpagename, talkpagenamee, talkspace, talkspacee, uc, ucfirst and urlencode
> De : Krinkle <krinklemail at gmail.com>
>À : HiddenId <courriel_achevrier at yahoo.fr>; MediaWiki announcements and site admin list <mediawiki-l at lists.wikimedia.org> 
>Envoyé le : Jeudi 8 mars 2012 12h16
>Objet : Re: [Mediawiki-l] Re : Re : howto include different page.css into one MediaWiki:CentralCSS.css page for organizing css cascade sheets?
>On Thu, Mar 8, 2012 at 11:25 AM, HiddenId <courriel_achevrier at yahoo.fr> wrote:
>Sorry I made written mistakes in my previous post.
>>Here is this post, with written mistakes corrected:
>>Hi Krinkle.
>>I've not reach to make your solution running.
>>I propose to try something:
>>Let's try to focuse on the modification of the #p-personal CSS used by monobook and vector skin.
>>Then, using your method, here what we have:
>>1. Defaut skin used: Vector
>>2. CSS parameter to modify: #p-personal
>>3. CSS modification to apply: #p-personal {width:100%; background-color:green;}
>> CSS page where this CSS modification is written:
>>MediaWiki:Vector.css/Layout.css page of our wiki. This page contains
>>only one line;
>>   #p-personal {width:100%; background-color:green;}
>>5. Using of @import rule inside MediaWiki:Vector.css: This page contains this line and only this line:
>>   @import url('/w/index.php?title=MediaWiki:Vector.css/Layout.css&action=raw&ctype=text/css');
>>6. Refreshing the browser: we use Firefox, we made ctrl+F5
>>7. Results: no change. The new CSS rule written in MediaWiki:Vector.css/Layout.css, is not applied.
>>What sort of mistake have we done ?
>What version of MediaWiki are you running?
>Can you include a link to your wiki so we can look at it?
>- Krinkle

More information about the MediaWiki-l mailing list