From 2d55b1670f34dc63ecc9ce4be20f1b04610d191b Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Wed, 27 Jul 2011 19:24:43 +0000 Subject: [PATCH] revert r93284 and follow up r93285 breaks parser tests. Please update the parser tests and reapply. --- includes/DefaultSettings.php | 2 +- includes/Linker.php | 7 ++- .../mediawiki.action.view.rightClickEdit.js | 12 ++--- skins/MonoBook.php | 2 +- skins/Vector.php | 2 +- skins/chick/IE60Fixes.css | 1 + skins/chick/main.css | 34 +++++++------- skins/cologneblue/screen.css | 6 ++- skins/common/oldshared.css | 24 ++++++++++ skins/common/shared.css | 20 +++----- skins/common/wikistandard.css | 24 ++++++++++ skins/modern/main.css | 13 ++---- skins/monobook/main.css | 28 ++++------- skins/simple/main.css | 46 ++++++++++++------- skins/vector/screen.css | 45 +++++++++--------- 15 files changed, 154 insertions(+), 112 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 01590a5fd2..0e796035af 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1617,7 +1617,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches do not keep obsolete copies of global * styles. */ -$wgStyleVersion = '304'; +$wgStyleVersion = '303'; /** * This will cache static pages for non-logged-in users to reduce diff --git a/includes/Linker.php b/includes/Linker.php index 880edd36ec..f724ca6d6a 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1506,11 +1506,10 @@ class Linker { * @return String: HTML headline */ public static function makeHeadline( $level, $attribs, $anchor, $text, $link, $legacyAnchor = false ) { - $ret = "
" - . "$text" - . "" - . "$link
"; + . ""; if ( $legacyAnchor !== false ) { $ret = "
$ret"; } diff --git a/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js b/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js index 350563f7f1..caf9a9f2e0 100644 --- a/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js +++ b/resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js @@ -3,12 +3,12 @@ */ jQuery( function( $ ) { // Select all h1-h6 elements that contain editsection links - $( '.mw-h1:has(.editsection a), ' + - '.mw-h2:has(.editsection a), ' + - '.mw-h3:has(.editsection a), ' + - '.mw-h4:has(.editsection a), ' + - '.mw-h5:has(.editsection a), ' + - '.mw-h6:has(.editsection a)' + $( 'h1:has(.editsection a), ' + + 'h2:has(.editsection a), ' + + 'h3:has(.editsection a), ' + + 'h4:has(.editsection a), ' + + 'h5:has(.editsection a), ' + + 'h6:has(.editsection a)' ).live( 'contextmenu', function( e ) { // Get href of the [edit] link var href = $(this).find( '.editsection a' ).attr( 'href' ); diff --git a/skins/MonoBook.php b/skins/MonoBook.php index adebc50ea5..ab72506769 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -78,7 +78,7 @@ class MonoBookTemplate extends BaseTemplate { data['sitenotice']) { ?>
html('sitenotice') ?>
-

html('title') ?>

+

html('title') ?>

msg('tagline') ?>
html('userlangattributes') ?>>html('subtitle') ?>
diff --git a/skins/Vector.php b/skins/Vector.php index 18c9d4615b..e0d87a8f4e 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -144,7 +144,7 @@ class VectorTemplate extends BaseTemplate { -

html( 'title' ) ?>

+

html( 'title' ) ?>

diff --git a/skins/chick/IE60Fixes.css b/skins/chick/IE60Fixes.css index a4c0a8f860..feec15f166 100644 --- a/skins/chick/IE60Fixes.css +++ b/skins/chick/IE60Fixes.css @@ -70,6 +70,7 @@ textarea { width: 96%; } +div.editsection, #catlinks, div.tright, div.tleft { diff --git a/skins/chick/main.css b/skins/chick/main.css index 8b2c755489..cdcd42cb48 100644 --- a/skins/chick/main.css +++ b/skins/chick/main.css @@ -42,36 +42,34 @@ hr { margin: 0.2em 0 0.2em 0; } -/* Headers */ -.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { +h1, h2, h3, h4, h5, h6 { color: black; background: none; + font-weight: normal; margin: 0; - border-bottom: 1px solid #aaa; -} -.mw-h3, .mw-h4, .mw-h5, .mw-h6 { - border-bottom: none; + overflow: hidden; + padding-top: 0.5em; + padding-bottom: 0.17em; + border-bottom: 1px solid #aaaaaa; } -h1, h2 { +.editsection { font-weight: normal; } h1 { font-size: 188%; } +h1 .editsection { font-size: 53.2%; } h2 { font-size: 150%; } +h2 .editsection { font-size: 66.7%; } +h3, h4, h5, h6 { + border-bottom: none; + font-weight: bold; +} h3 { font-size: 132%; } +h3 .editsection { font-size: 75.8%; } h4 { font-size: 116%; } +h4 .editsection { font-size: 86.2%; } h5 { font-size: 100%; } h6 { font-size: 80%; } - -/* To replicate the old padding, where h# were block-level elements and edit - * links were floated, we need to multiply .5em top padding and .17em bottom - * padding by the header text sizes. */ -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */ -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */ -.mw-h3 { padding: .66em 0 .22em; } /* etc. */ -.mw-h4 { padding: .58em 0 .20em; } -.mw-h5 { padding: .50em 0 .17em; } -.mw-h6 { padding: .40em 0 .14em; } - +h6 .editsection { font-size: 125%; } ul { line-height: 1.5em; diff --git a/skins/cologneblue/screen.css b/skins/cologneblue/screen.css index a70685740a..d5ed280df6 100644 --- a/skins/cologneblue/screen.css +++ b/skins/cologneblue/screen.css @@ -164,6 +164,10 @@ h1 { line-height: 21pt; } +h1 .editsection { + font-size: 55.6%; +} + h1.pagetitle { padding-bottom: 0; margin-bottom: 0; @@ -203,7 +207,7 @@ a.new, #quickbar a.new { color: #CC2200; } -.mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { +h2, h3, h4, h5, h6 { margin-bottom: 0; } diff --git a/skins/common/oldshared.css b/skins/common/oldshared.css index 8abae4108a..071e521632 100644 --- a/skins/common/oldshared.css +++ b/skins/common/oldshared.css @@ -4,6 +4,30 @@ * CologneBlue, the old pre-Monobook skins */ +/* For clarity, explicitly state some recommendations from to make sure the editsection links scale right */ + +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; +} +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 */ /* @noflip */ diff --git a/skins/common/shared.css b/skins/common/shared.css index 39f7cd37c9..f01b4b4020 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -82,22 +82,14 @@ div#mw-js-message { background-color: #fcfcfc; } -/* Display headings on the same line as edit link */ -h1, h2, h3, h4, h5, h6 { display: inline; margin: 0; } -/* But then we have to reintroduce the margin. We use the W3 recommended mar- - * gins , multiplying by the recom- - * mended font-size. */ -.mw-h1 { margin: 1.34em 0; } -.mw-h2 { margin: 1.13em 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; } - -/* Give edi section link some space */ +/* Edit section links */ .editsection { - margin: 0 .8em; + float: right; + margin-left: 5px; } +/* Correct directionality when page dir is different from site/user dir */ +/* @noflip */.mw-content-ltr .editsection, .mw-content-rtl .mw-content-ltr .editsection { float: right; } +/* @noflip */.mw-content-rtl .editsection, .mw-content-ltr .mw-content-rtl .editsection { float: left; } /** * File histories */ diff --git a/skins/common/wikistandard.css b/skins/common/wikistandard.css index e647fb201a..6205092286 100644 --- a/skins/common/wikistandard.css +++ b/skins/common/wikistandard.css @@ -96,10 +96,18 @@ h1.pagetitle { font-size: 150%; } +h1.pagetitle .editsection { + font-size: 66.7%; +} + h2 { font-size: 120%; } +h2 .editsection { + font-size: 83.3%; +} + h2, h3, h4, h5, h6 { margin-bottom: 0; } @@ -108,18 +116,34 @@ 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; diff --git a/skins/modern/main.css b/skins/modern/main.css index d1dc5c07cf..d1fa902086 100644 --- a/skins/modern/main.css +++ b/skins/modern/main.css @@ -334,17 +334,12 @@ span.editsection { font-size: small; } -.mw-h1, -.mw-h2, -.mw-h3, -.mw-h4, -.mw-h5, -.mw-h6 { - overflow: hidden; +h1, h2 { border-bottom: solid 1px #036; } -.mw-h3, .mw-h4, .mw-h5, .mw-h6 { - border-bottom: none; + +h1, h2, h3, h4, h5, h6 { + overflow: hidden; } #preftoc { diff --git a/skins/monobook/main.css b/skins/monobook/main.css index 886c47bb55..75b57e3555 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -107,40 +107,32 @@ hr { margin: .2em 0 .2em 0; } -/* Headers */ -.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { +h1, h2, h3, h4, h5, h6 { color: black; background: none; + font-weight: normal; margin: 0; overflow: hidden; + padding-top: .5em; + padding-bottom: .17em; border-bottom: 1px solid #aaa; } -.mw-h3, .mw-h4, .mw-h5, .mw-h6 { - border-bottom: none; -} -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%; } - -/* To replicate the old padding, where h# were block-level elements and edit - * links were floated, we need to multiply .5em top padding and .17em bottom - * padding by the header text sizes. */ -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */ -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */ -.mw-h3 { padding: .66em 0 .22em; } /* etc. */ -.mw-h4 { padding: .58em 0 .20em; } -.mw-h5 { padding: .50em 0 .17em; } -.mw-h6 { padding: .40em 0 .14em; } - +h6 .editsection { font-size: 125%; font-weight: normal; } ul { line-height: 1.5em; diff --git a/skins/simple/main.css b/skins/simple/main.css index 4524a7ef56..db889b9358 100644 --- a/skins/simple/main.css +++ b/skins/simple/main.css @@ -1,3 +1,26 @@ +/* For clarity, explicitly state some recommendations from to make sure the editsection links scale right */ + +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; +} +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% } + + #toolbar { display: none; } @@ -63,22 +86,11 @@ p { } p img { margin: 0; } -.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { - margin: 0; -} -/* To replicate the old padding, where h# were block-level elements and edit - * links were floated, we need to multiply .5em top padding and .17em bottom - * padding by the header text sizes. We assume the W3 recommendations are - * used: 200%, 150%, 117%, 100%, 83%, 75% size in that order - * . If not the padding may be margin- - * ally off. */ -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */ -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */ -.mw-h3 { padding: .66em 0 .22em; } /* etc. */ -.mw-h4 { padding: .58em 0 .20em; } -.mw-h5 { padding: .50em 0 .17em; } -.mw-h6 { padding: .40em 0 .14em; } - +h1, h2, h3, h4, h5, h6 { + margin: 0; + padding-top: 0.5em; + padding-bottom: 0.17em; +} fieldset { margin: 1em 0em 1em 0em; padding: 0em 1em 1em 1em; @@ -183,7 +195,7 @@ pre { border: solid 1px black; } -.firstHeading, .mw-h2 { +h1.firstHeading, h2 { border-bottom: solid 1px black; } #bodyContent a[href ^="http://"], diff --git a/skins/vector/screen.css b/skins/vector/screen.css index 4ecf426041..8f611b76e9 100644 --- a/skins/vector/screen.css +++ b/skins/vector/screen.css @@ -727,41 +727,42 @@ hr { } /* Structural Elements */ -.mw-h1, -.mw-h2, -.mw-h3, -.mw-h4, -.mw-h5, -.mw-h6 { +h1, +h2, +h3, +h4, +h5, +h6 { color: black; background: none; + font-weight: normal; margin: 0; overflow: hidden; + padding-top: .5em; + padding-bottom: .17em; border-bottom: 1px solid #aaa; width: auto; } -.mw-h3, .mw-h4, .mw-h5, .mw-h6 { - border-bottom: none; -} -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%; } - -/* To replicate the old padding, where h# were block-level elements and edit - * links were floated, we need to multiply .5em top padding and .17em bottom - * padding by the header text sizes. */ -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */ -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */ -.mw-h3 { padding: .66em 0 .22em; } /* etc. */ -.mw-h4 { padding: .58em 0 .20em; } -.mw-h5 { padding: .50em 0 .17em; } -.mw-h6 { padding: .40em 0 .14em; } - - +h6 .editsection { font-size: 125%; font-weight: normal; } +.editsection { float: right; } p { margin: .4em 0 .5em 0; line-height: 1.5em; -- 2.20.1