Keep CSS away from old Netscape, which mucks it up anyway
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 24 Feb 2004 07:51:04 +0000 (07:51 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 24 Feb 2004 07:51:04 +0000 (07:51 +0000)
includes/Skin.php

index cdf16ef..f3d0558 100644 (file)
@@ -83,9 +83,7 @@ class Skin {
                wfProfileIn( $fname );
                
                $out->addLink( "shortcut icon", "", "/favicon.ico" );
-               if ( $out->isPrintable() ) { $ss = "wikiprintable.css"; }
-               else { $ss = $this->getStylesheet(); }
-               $out->addLink( "stylesheet", "", "{$wgStyleSheetPath}/{$ss}" );
+               
                wfProfileOut( $fname );
        }
        
@@ -126,8 +124,17 @@ class Skin {
 
        function getUserStyles()
        {
+               global $wgOut, $wgStyleSheetPath;
+               if( $wgOut->isPrintable() ) {
+                       $sheet = "wikiprintable.css";
+               } else {
+                       $sheet = $this->getStylesheet();
+               }
                $s = "<style type='text/css'><!--\n";
+               $s .= "@import url(\"$wgStyleSheetPath/$sheet\");\n";
+               $s .= "@media screen {\n";
                $s .= $this->doGetUserStyles();
+               $s .= "}\n";
                $s .= "//--></style>\n";
                return $s;
        }