From 7ca126466effddfda31805d9ccf2a603c957adad Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 12 Nov 2006 15:20:21 +0000 Subject: [PATCH] Revert 17507 and 17518; more weird screwing about with headers, messing up styles. Can we maybe stop playing with this on trunk? --- includes/Parser.php | 11 ++++--- includes/Skin.php | 2 +- maintenance/parserTests.txt | 60 +++++++++++++++++------------------ skins/MonoBook.php | 2 +- skins/common/cologneblue.css | 5 +-- skins/common/common.css | 28 ++++++++++------ skins/common/commonPrint.css | 3 ++ skins/common/nostalgia.css | 4 +-- skins/common/wikistandard.css | 13 +++++--- skins/monobook/main.css | 30 ++++++++++-------- 10 files changed, 90 insertions(+), 68 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index bf5c73309d..e5550dc125 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3522,7 +3522,7 @@ class Parser $toc .= $sk->tocLine($anchor, $tocline, $numbering, $toclevel); } # give headline the correct tag - @$head[$headlineCount] .= "
"; + @$head[$headlineCount] .= "editSectionLink($this->mTitle, $sectionCount+1, $headline_hint); } - // 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 . - $head[$headlineCount] .= "
"; + // 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] .= ' '.$headline.''; $headlineCount++; if( !$istemplate ) diff --git a/includes/Skin.php b/includes/Skin.php index 94766455ee..0f9ca2ca67 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -763,7 +763,7 @@ END; function pageTitle() { global $wgOut; - $s = '

' . htmlspecialchars( $wgOut->getPageTitle() ) . '

'; + $s = '

' . htmlspecialchars( $wgOut->getPageTitle() ) . '

'; return $s; } diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index e43ab0a12a..e93bbfd550 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -3164,13 +3164,13 @@ More ===Smaller headline=== Blah blah !! result -
[edit]

Headline 1

+

[edit] Headline 1

Some text

-
[edit]

Headline 2

+

[edit] Headline 2

More

-
[edit]

Smaller headline

+

[edit] Smaller headline

Blah blah

!! end @@ -3209,14 +3209,14 @@ Some text -
[edit]

Headline 1

-
[edit]

Subheadline 1

-
[edit]
Skipping a level
-
[edit]
Skipping a level
-
[edit]

Headline 2

+

[edit] Headline 1

+

[edit] Subheadline 1

+
[edit] Skipping a level
+
[edit] Skipping a level
+

[edit] Headline 2

Some text

-
[edit]

Another headline

+

[edit] Another headline

!! end @@ -3264,16 +3264,16 @@ Handling of sections up to level 6 and beyond -
[edit]

Level 1 Heading

-
[edit]

Level 2 Heading

-
[edit]

Level 3 Heading

-
[edit]

Level 4 Heading

-
[edit]
Level 5 Heading
-
[edit]
Level 6 Heading
-
[edit]
= Level 7 Heading=
-
[edit]
== Level 8 Heading==
-
[edit]
=== Level 9 Heading===
-
[edit]
==== Level 10 Heading====
+

[edit] Level 1 Heading

+

[edit] Level 2 Heading

+

[edit] Level 3 Heading

+

[edit] Level 4 Heading

+
[edit] Level 5 Heading
+
[edit] Level 6 Heading
+
[edit] = Level 7 Heading=
+
[edit] == Level 8 Heading==
+
[edit] === Level 9 Heading===
+
[edit] ==== Level 10 Heading====
!! end @@ -3283,8 +3283,8 @@ Resolving duplicate section names == Foo bar == == Foo bar == !! result -
[edit]

Foo bar

-
[edit]

Foo bar

+

[edit] Foo bar

+

[edit] Foo bar

!! end @@ -3303,10 +3303,10 @@ __NOTOC__ {{sections}} ==Section 4== !! result -
[edit]

Section 0

-
[edit]

Section 1

-
[edit]

Section 2

-
[edit]

Section 4

+

[edit] Section 0

+

[edit] Section 1

+

[edit] Section 2

+

[edit] Section 4

!! end @@ -3317,8 +3317,8 @@ __NOEDITSECTION__ ==Section 1== ==Section 2== !! result -

Section 1

-

Section 2

+

Section 1

+

Section 2

!! end @@ -3327,7 +3327,7 @@ Link inside a section heading !! input ==Section with a [[Main Page|link]] in it== !! result -
[edit]

Section with a link in it

+

[edit] Section with a link in it

!! end @@ -4468,7 +4468,7 @@ Fuzz testing: Parser14 == onmouseover= == http://__TOC__ !! result -
[edit]

onmouseover=

+

[edit] onmouseover=

http://

Contents

  • 1 onmouseover=
  • @@ -4483,7 +4483,7 @@ Fuzz testing: Parser14-table ==a== {| STYLE=__TOC__ !! result -
    [edit]

    a

    +

    [edit] a

    diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 9837fd21a8..4322e0dc74 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -95,7 +95,7 @@ class MonoBookTemplate extends QuickTemplate {
    data['sitenotice']) { ?>
    html('sitenotice') ?>
    -

    data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

    +

    data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

    msg('tagline') ?>

    html('subtitle') ?>
    diff --git a/skins/common/cologneblue.css b/skins/common/cologneblue.css index 4b2e1ea709..5b6e5bca1a 100644 --- a/skins/common/cologneblue.css +++ b/skins/common/cologneblue.css @@ -78,7 +78,8 @@ h1 { font-family: Verdana, Arial, sans-serif; font-size: 180%; line-height: 21pt; } -.mw-first-heading { padding-bottom: 0; margin-bottom: 0; } +h1 .editsection { font-size: 55.6%; } +h1.pagetitle { 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; @@ -90,6 +91,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; } -.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { margin-bottom: 0; } +h2, h3, h4, h5, h6 { margin-bottom: 0; } small { font-size: 75%; } input.mw-searchInput { width: 106px; } \ No newline at end of file diff --git a/skins/common/common.css b/skins/common/common.css index fb722e7cd9..3d4bc5edcc 100644 --- a/skins/common/common.css +++ b/skins/common/common.css @@ -3,21 +3,29 @@ * This file contains CSS settings common to Wikistandard, Nostalgia and CologneBlue */ -/* Header margin values from . - 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; } +/* 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; 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 */ diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css index 4429e5de33..314ff5543e 100644 --- a/skins/common/commonPrint.css +++ b/skins/common/commonPrint.css @@ -134,6 +134,9 @@ h1, h2, h3, h4, h5, h6 { font-weight: bold; } +.editsection { + font-weight: normal; +} p, .documentDescription { margin: 1em 0 ! important; diff --git a/skins/common/nostalgia.css b/skins/common/nostalgia.css index 4d5ec7e133..c9b36a70b0 100644 --- a/skins/common/nostalgia.css +++ b/skins/common/nostalgia.css @@ -9,8 +9,8 @@ body { a.interwiki, a.external { color: #3366BB; } a.printable { text-decoration: underline; } a.stub { color:#772233; text-decoration:none; } -.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; } +h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; } +h2, h3, h4, h5, h6 { margin-bottom: 0; } textarea { overflow: auto; } p.subtitle { padding-top: 0; margin-top: 0; } diff --git a/skins/common/wikistandard.css b/skins/common/wikistandard.css index 169fa30be6..532e4fdca8 100644 --- a/skins/common/wikistandard.css +++ b/skins/common/wikistandard.css @@ -25,15 +25,20 @@ form.inline { display: inline; } textarea { overflow: auto; } -.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; } +h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; +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;} 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;} diff --git a/skins/monobook/main.css b/skins/monobook/main.css index 9647826075..8c065b240c 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -110,29 +110,30 @@ hr { } h1, h2, h3, h4, h5, h6 { - display: inline; color: black; background: none; - margin: 0; - padding: 0; -} -h1, h2 { font-weight: normal; + margin: 0; + padding-top: .5em; + padding-bottom: .17em; + border-bottom: 1px solid #aaa; } 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%; } -.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; } +h6 .editsection { font-size: 125%; font-weight: normal; } .editsection { float: right; @@ -255,6 +256,9 @@ span.subpages { #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: .3em; } +.firstHeading { + margin-bottom: .1em; +} /* user notification thing */ .usermessage { -- 2.20.1