As far as I can see, there is currently no way to specify a global CSS for the Classi...
authorArne Heizmann <timwi@users.mediawiki.org>
Fri, 16 Jul 2004 20:52:23 +0000 (20:52 +0000)
committerArne Heizmann <timwi@users.mediawiki.org>
Fri, 16 Jul 2004 20:52:23 +0000 (20:52 +0000)
in the way it is possible for Monobook with [[MediaWiki:Monobook.css]]. This patch adds this
capability, at [[MediaWiki:Standard.css]] (well, technically, at
[[MediaWiki:<nameoftheskin>.css]], so it's not my fault it's called "Standard" and not
"Classic". ;-) )

includes/Skin.php

index db44468..5c16a87 100644 (file)
@@ -200,16 +200,17 @@ class Skin {
 
        function doGetUserStyles()
        {
-               global $wgUser;
+               global $wgUser, $wgLang;
+
+               $csspage = $wgLang->getNsText( NS_MEDIAWIKI ) . ":" . $this->getSkinName() . ".css";
+               $s = '@import "'.$this->makeUrl($csspage, 'action=raw&ctype=text/css')."\";\n";
 
-               $s = '';
                if ( 1 == $wgUser->getOption( 'underline' ) ) {
                        # Don't override browser settings
                } else {
                        # CHECK MERGE @@@
                        # Force no underline
-                       $s .= 'a { ' .
-                         "text-decoration: none; }\n";
+                       $s .= "a { text-decoration: none; }\n";
                }
                if ( 1 == $wgUser->getOption( 'highlightbroken' ) ) {
                        $s .= "a.new, #quickbar a.new { color: #CC2200; }\n";