From 195ed61a82e021fcdea2cd48d44ac95fc90bf223 Mon Sep 17 00:00:00 2001 From: Leo Koppelkamm Date: Wed, 27 Jul 2011 13:24:19 +0000 Subject: [PATCH] Remove semantically incorrect wrapper table from toc and replace it with an inline-blocked diff. Update some skin css, since we don't have the implicit table padding anymore and need to increase to padding to maintain the current look. Bug 13766 --- includes/Linker.php | 4 ++-- skins/common/shared.css | 12 +++++++++++- skins/modern/main.css | 7 +------ skins/monobook/main.css | 3 +-- skins/vector/screen.css | 3 +-- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index f724ca6d6a..525a6fad5a 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1456,10 +1456,10 @@ class Linker { static function tocList( $toc, $lang = false ) { $title = wfMsgExt( 'toc', array( 'language' => $lang, 'escape' ) ); return - '
' + '
' . '

' . $title . "

\n" . $toc - . "\n
\n"; + . "\n\n"; } /** diff --git a/skins/common/shared.css b/skins/common/shared.css index f01b4b4020..b0d0689a32 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -783,4 +783,14 @@ div.floatright, table.floatright, div.floatleft, table.floatleft { } /* bug 12205 */ -#mw-credits a { unicode-bidi: embed; } \ No newline at end of file +#mw-credits a { + unicode-bidi: embed; +} + +/* Standard toc */ +#toc { + display: inline-block; + /* IE6+7 workaround */ + zoom: 1; + display: inline !ie; +} \ No newline at end of file diff --git a/skins/modern/main.css b/skins/modern/main.css index 49af0b9fef..5c6f67a190 100644 --- a/skins/modern/main.css +++ b/skins/modern/main.css @@ -556,11 +556,6 @@ img.thumbborder { border: solid 1px #bbb; } -#toc tr, #toc td { - margin: 0; - padding: 0; -} - #toctitle { border-bottom: solid 1px #3c78b5; background-color: #ddd; @@ -587,7 +582,7 @@ img.thumbborder { list-style-type: none; list-style-image: none; margin: 0 1em; - padding-left: 0; + padding: 0; text-align: left; } diff --git a/skins/monobook/main.css b/skins/monobook/main.css index 75b57e3555..0fcb4780dd 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -348,8 +348,7 @@ table.small { .toc ul { list-style-type: none; list-style-image: none; - margin-left: 0; - padding-left: 0; + padding: 0 .4em; text-align: left; } #toc ul ul, diff --git a/skins/vector/screen.css b/skins/vector/screen.css index 8f611b76e9..ba604b42de 100644 --- a/skins/vector/screen.css +++ b/skins/vector/screen.css @@ -884,8 +884,7 @@ select { .toc ul { list-style-type: none; list-style-image: none; - margin-left: 0; - padding-left: 0; + padding: 0 .4em; text-align: left; } #toc ul ul, -- 2.20.1