On Feb 24, 2012, at 5:25 PM, HiddenId wrote:

> Hi,
> We've created one page called MediaWiki:CentralCSS.css . This page is 
> supposed to "call" css subpages.
> 
> 
> Then we've created 5 css subpages, called :
> * MediaWiki:Reset.css
> * MediaWiki:Layout.css
> * MediaWiki:Colors.css
> * MediaWiki:Typo.css
> * MediaWiki:Special.css
> 
> Now, we'd like the 5 css subpages been "called" into the central one.
> 
> What should we write into the MediaWiki:CentralCSS.css in order to get the 
> css rules writen in subpages, working across the central css page ?


>From within a css file the only way to import another css file is to use 
>"@import". So if your wiki is installed at https://example.org/w/ and articles 
>viewed at https://example.org/wiki/Article. Then you'd put somethig like this 
>into your central .css:

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

I don't know where you are using "MediaWiki:CentralCSS.css" but there is a css 
page by default on MediaWiki wikis called "MediaWiki:Common.css" that is loaded 
on all pages, perhaps use that instead to load your css pages.

And store the other ones as sub pages from it, to keep the 
MediaWIiki:-namespace clean.

So MediaWiki:Common.css would contain

  @import 
url('/w/index.php?title=MediaWiki:Common.css/layout.css&action=raw&ctype=text/css');

-- Krinkle


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to