Fix regression in usability per <http://mail.wikipedia.org/pipermail/wikitech-l/2006...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 9 Nov 2006 07:06:58 +0000 (07:06 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 9 Nov 2006 07:06:58 +0000 (07:06 +0000)
includes/DefaultSettings.php
includes/Parser.php
includes/Skin.php
skins/MonoBook.php
skins/common/cologneblue.css
skins/common/common.css
skins/common/commonPrint.css
skins/common/nostalgia.css
skins/common/wikistandard.css
skins/monobook/main.css

index a78f6f9..9e2ce25 100644 (file)
@@ -1037,7 +1037,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches don't keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '24';
+$wgStyleVersion = '25';
 
 # Server-side caching:
 
index 336b6f8..36e112a 100644 (file)
@@ -3520,7 +3520,7 @@ class Parser
                                $toc .= $sk->tocLine($anchor, $tocline, $numbering, $toclevel);
                        }
                        # give headline the correct <h#> tag
-                       @$head[$headlineCount] .= "<a name=\"$anchor\"></a><h".$level.$matches[2][$headlineCount];
+                       @$head[$headlineCount] .= "<a name=\"$anchor\"></a><div class=\"mw-h$level\">";
 
                        if( $showEditLink && ( !$istemplate || $templatetitle !== "" ) ) {
                                if ( empty( $head[$headlineCount] ) ) {
@@ -3531,11 +3531,10 @@ class Parser
                                else
                                        $head[$headlineCount] .= $sk->editSectionLink($this->mTitle, $sectionCount+1, $headline_hint);
                        }
-                       // Yes, the headline logically goes before the edit section.  Why isn't it there
-                       // in source?  Ask the CSS people.  The float gets screwed up if you do that.
-                       // This might be moved to before the editsection at some point so that it will
-                       // display a bit more prettily without CSS, so please don't rely on the order.
-                       $head[$headlineCount] .= ' <span class="mw-headline">'.$headline.'</span></h'.$level.'>';
+                       // Yes, the headline logically goes before the edit section.  It can't
+                       // be put there, however, because of bugs in IE's and Firefox's float
+                       // rendering. See <https://bugzilla.mozilla.org/show_bug.cgi?id=50630>.
+                       $head[$headlineCount] .= " <h$level{$matches[2][$headlineCount]}$headline</h$level></div>";
 
                        $headlineCount++;
                        if( !$istemplate )
index 0f9ca2c..9476645 100644 (file)
@@ -763,7 +763,7 @@ END;
 
        function pageTitle() {
                global $wgOut;
-               $s = '<h1 class="pagetitle">' . htmlspecialchars( $wgOut->getPageTitle() ) . '</h1>';
+               $s = '<div class="mw-h1 mw-first-heading"><h1 class="pagetitle">' . htmlspecialchars( $wgOut->getPageTitle() ) . '</h1></div>';
                return $s;
        }
 
index 4322e0d..9837fd2 100644 (file)
@@ -95,7 +95,7 @@ class MonoBookTemplate extends QuickTemplate {
        <div id="content">
                <a name="top" id="top"></a>
                <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
-               <h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
+               <div class="mw-h1 mw-first-heading"><h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1></div>
                <div id="bodyContent">
                        <h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
                        <div id="contentSub"><?php $this->html('subtitle') ?></div>
index 5b6e5bc..4b2e1ea 100644 (file)
@@ -78,8 +78,7 @@ h1 {
  font-family: Verdana, Arial, sans-serif;
  font-size: 180%; line-height: 21pt;
 }
-h1 .editsection { font-size: 55.6%; }
-h1.pagetitle { padding-bottom: 0; margin-bottom: 0; }
+.mw-first-heading { padding-bottom: 0; margin-bottom: 0; }
 #article p.subtitle {
  color: #666666; font-size: 11pt; font-weight: bold;
  padding-top: 0; margin-top: 0; padding-bottom: 1ex;
@@ -91,6 +90,6 @@ a:visited { color: #8D0749; }
 a.printable { text-decoration: underline; }
 a.stub, #quickbar a.stub { color:#772233; text-decoration:none; }
 a.new, #quickbar a.new { color: #CC2200; }
-h2, h3, h4, h5, h6 { margin-bottom: 0; }
+.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { margin-bottom: 0; }
 small { font-size: 75%; }
 input.mw-searchInput { width: 106px; }
\ No newline at end of file
index 3d4bc5e..fb722e7 100644 (file)
@@ -3,29 +3,21 @@
  * This file contains CSS settings common to Wikistandard, Nostalgia and CologneBlue
  */
 
-/* For clarity, explicitly state some recommendations from <http://www.w3.org/
-   TR/CSS21/sample.html> to make sure the editsection links scale right */
+/* Header margin values from <http://www.w3.org/TR/CSS21/sample.html>.
+   Frankly they're quite stupid and I have no idea if they're actually used,
+   but that's life. */
+.mw-h1 { margin: 1.33em 0 }
+.mw-h2 { margin: 1.25em 0 }
+.mw-h3 { margin: 0.97em 0 }
+.mw-h4 { margin: 1.12em 0 }
+.mw-h5 { margin: 1.25em 0 }
+.mw-h6 { margin: 1.25em 0 }
+h1, h2, h3, h4, h5, h6 { display: inline; padding: 0; margin: 0; }
 
-h1 { font-size: 2em; }
-h2 { font-size: 1.5em; }
-h3 { font-size: 1.17em; }
-h5 { font-size: .83em; }
-h6 { font-size: .75em; }
-h1, h2, h3, h4, h5, h6 { font-weight: bolder }
-
-/* Now the custom parts */
-
-/* Make edit sections (which are inside h# tags) normal-sized */
 .editsection {
-       font-weight: normal;
        float: right;
        margin-left: 5px;
 }
-h1 .editsection { font-size: 50% }
-h2 .editsection { font-size: 66.7% }
-h3 .editsection { font-size: 85.5% }
-h5 .editsection { font-size: 120% }
-h6 .editsection { font-size: 133% }
 
 #footer { clear: both }
 /* images */
index 314ff55..4429e5d 100644 (file)
@@ -134,9 +134,6 @@ h1, h2, h3, h4, h5, h6
 {
        font-weight: bold;
 }
-.editsection {
-       font-weight: normal;
-}
 
 p, .documentDescription {
     margin: 1em 0 ! important;
index c9b36a7..4d5ec7e 100644 (file)
@@ -9,8 +9,8 @@ body {
 a.interwiki, a.external { color: #3366BB; }
 a.printable { text-decoration: underline; }
 a.stub { color:#772233; text-decoration:none; }
-h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; }
-h2, h3, h4, h5, h6 { margin-bottom: 0; }
+.mw-first-heading { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; }
+.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { margin-bottom: 0; }
 textarea { overflow: auto; }
 p.subtitle { padding-top: 0; margin-top: 0; }
 
index 532e4fd..169fa30 100644 (file)
@@ -25,20 +25,15 @@ form.inline { display: inline; }
 textarea { overflow: auto; }
 
 
-h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0;
-font-size:150%; }
-h1.pagetitle .editsection { font-size: 66.7%; }
+.mw-first-heading { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; }
+.mw-first-heading h1 { font-size: 1.5em; }
+.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { margin-bottom: 0;}
+h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; display: inline; }
 h2 { font-size: 120%; }
-h2 .editsection { font-size: 83.3%; }
-h2, h3, h4, h5, h6 { margin-bottom: 0;}
 h3 { font-size: 106.25%; }
-h3 .editsection { font-size: 94.1%; }
 h4 { font-size: 103.125%; }
-h4 .editsection { font-size: 97.0%; }
 h5 { font-size: 100%; }
-h5 .editsection { font-size: 100%; }
 h6 { font-size: 95%; }
-h6 .editsection { font-size: 105.3%; }
 hr.sep { color:gray;height:1px;background-color:gray;}
 p.subpages { font-size:small;}
 p.subtitle { padding-top: 0; margin-top: 0;}
index 8c065b2..9647826 100644 (file)
@@ -110,30 +110,29 @@ hr {
 }
 
 h1, h2, h3, h4, h5, h6 {
+       display: inline;
        color: black;
        background: none;
-       font-weight: normal;
        margin: 0;
-       padding-top: .5em;
-       padding-bottom: .17em;
-       border-bottom: 1px solid #aaa;
+       padding: 0;
+}
+h1, h2 {
+       font-weight: normal;
 }
 h1 { font-size: 188%; }
-h1 .editsection { font-size: 53%; }
 h2 { font-size: 150%; }
-h2 .editsection { font-size: 67%; }
-h3, h4, h5, h6 {
-       border-bottom: none;
-       font-weight: bold;
-}
 h3 { font-size: 132%; }
-h3 .editsection { font-size: 76%; font-weight: normal; }
 h4 { font-size: 116%; }
-h4 .editsection { font-size: 86%; font-weight: normal; }
 h5 { font-size: 100%; }
-h5 .editsection { font-weight: normal; }
 h6 { font-size: 80%;  }
-h6 .editsection { font-size: 125%; font-weight: normal; }
+.mw-h1 { padding-top: .94em; padding-bottom: .32em; }
+.mw-h2 { padding-top: .75em; padding-bottom: .26em; }
+.mw-h3 { padding-top: .66em; padding-bottom: .22em; }
+.mw-h4 { padding-top: .58em; padding-bottom: .20em; }
+.mw-h5 { padding-top: .50em; padding-bottom: .17em; }
+.mw-h6 { padding-top: .40em; padding-bottom: .14em; }
+.mw-h1, .mw-h2 { border-bottom: 1px solid #aaa; }
+.mw-first-heading { margin-bottom: .1em; }
 
 .editsection {
        float: right;
@@ -256,9 +255,6 @@ span.subpages {
 #bodyContent h3, #bodyContent h4, #bodyContent h5 {
        margin-bottom: .3em;
 }
-.firstHeading {
-       margin-bottom: .1em;
-}
 
 /* user notification thing */
 .usermessage {