From: Leo Koppelkamm Date: Fri, 8 Jul 2011 17:59:42 +0000 (+0000) Subject: Moving skins/common/diff.css to mediawiki.action.history.diff.css and updating some... X-Git-Tag: 1.31.0-rc.0~28984 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=455661a73ce2d59d87841992b67c6f9255438079;p=lhc%2Fweb%2Fwiklou.git Moving skins/common/diff.css to mediawiki.action.history.diff.css and updating some old comments in the process. Also moved one vendor-prefixed attribute in fron of the standard one. Extension follow in a second --- diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index d6c4109359..ded08f26a9 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -660,7 +660,7 @@ CONTROL; */ function showDiffStyle() { global $wgOut; - $wgOut->addModuleStyles( 'mediawiki.legacy.diff' ); + $wgOut->addModuleStyles( 'mediawiki.action.history.diff' ); } /** diff --git a/resources/Resources.php b/resources/Resources.php index 5aed304372..faa9cfe848 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -491,6 +491,10 @@ return array( 'dependencies' => 'jquery.ui.button', 'group' => 'mediawiki.action.history', ), + 'mediawiki.action.history.diff' => array( + 'styles' => 'resources/mediawiki.action/mediawiki.action.history.diff.css', + 'group' => 'mediawiki.action.history', + ), 'mediawiki.action.edit' => array( 'scripts' => 'resources/mediawiki.action/mediawiki.action.edit.js', 'dependencies' => array( @@ -637,12 +641,6 @@ return array( 'localBasePath' => $GLOBALS['wgStyleDirectory'], 'dependencies' => 'mediawiki.legacy.wikibits', ), - 'mediawiki.legacy.diff' => array( - 'styles' => 'common/diff.css', - 'group' => 'mediawiki.action.history', - 'remoteBasePath' => $GLOBALS['wgStylePath'], - 'localBasePath' => $GLOBALS['wgStyleDirectory'], - ), 'mediawiki.legacy.edit' => array( 'scripts' => 'common/edit.js', 'remoteBasePath' => $GLOBALS['wgStylePath'], diff --git a/resources/mediawiki.action/mediawiki.action.history.diff.css b/resources/mediawiki.action/mediawiki.action.history.diff.css new file mode 100644 index 0000000000..a949d3a25d --- /dev/null +++ b/resources/mediawiki.action/mediawiki.action.history.diff.css @@ -0,0 +1,60 @@ +/* +** Diff rendering +*/ +table.diff, td.diff-otitle, td.diff-ntitle { + background-color: white; +} +td.diff-otitle, +td.diff-ntitle { + text-align: center; +} +td.diff-marker { + text-align: right; +} +td.diff-lineno { + font-weight: bold; +} +td.diff-addedline { + background: #cfc; + font-size: smaller; +} +td.diff-deletedline { + background: #ffa; + font-size: smaller; +} +td.diff-context { + background: #eee; + font-size: smaller; +} +.diffchange { + color: red; + font-weight: bold; + white-space: -moz-pre-wrap; + white-space: pre-wrap; +} + +table.diff { + border: none; + width: 98%; + border-spacing: 4px; + + /* Ensure that colums are of equal width */ + table-layout: fixed; +} +table.diff td { + padding: 0; +} +table.diff col.diff-marker { + width: 2%; +} +table.diff col.diff-content { + width: 48%; +} +table.diff td div { + /* Force-wrap very long lines such as URLs or page-widening char strings.*/ + word-wrap: break-word; + + /* As fallback (FF<3.5, Opera <10.5), scrollbars will be added for very wide cells + instead of text overflowing or widening */ + overflow: auto; +} diff --git a/skins/common/diff.css b/skins/common/diff.css deleted file mode 100644 index 80286d8e63..0000000000 --- a/skins/common/diff.css +++ /dev/null @@ -1,75 +0,0 @@ -/* -** Diff rendering -*/ -table.diff, td.diff-otitle, td.diff-ntitle { - background-color: white; -} -td.diff-otitle, -td.diff-ntitle { - text-align: center; -} -td.diff-marker { - text-align: right; -} -td.diff-lineno { - font-weight: bold; -} -td.diff-addedline { - background: #cfc; - font-size: smaller; -} -td.diff-deletedline { - background: #ffa; - font-size: smaller; -} -td.diff-context { - background: #eee; - font-size: smaller; -} -.diffchange { - color: red; - font-weight: bold; - text-decoration: none; - white-space: pre-wrap; - white-space: -moz-pre-wrap; -} - -table.diff { - border: none; - width: 98%; - border-spacing: 4px; - - /* Fixed layout is required to ensure that cells containing long URLs - don't widen in Safari, Internet Explorer, or iCab */ - table-layout: fixed; -} -table.diff td { - padding: 0; -} -table.diff col.diff-marker { - width: 2%; -} -table.diff col.diff-content { - width: 48%; -} -table.diff td div { - /* Force-wrap very long lines such as URLs or page-widening char strings. - CSS 3 only (In Gecko 1.9.1 / Firefox 3.5): - https://bugzilla.mozilla.org/show_bug.cgi?id=99457 - https://developer.mozilla.org/web-tech/2008/08/20/word-wrap-break-word/ - https://developer.mozilla.org/En/CSS/Word-wrap */ - word-wrap: break-word; - - /* As fallback, scrollbars will be added for very wide cells - instead of text overflowing or widening */ - overflow: auto; - - /* The above rule breaks on very old versions of Mozilla due - to a bug which collapses the table cells to a single line. - - In Mozilla 1.1 and below with JavaScript enabled, the rule - will be overridden with this by diff.js; wide cell contents - then spill horizontally without widening the rest of the - table: */ - /* overflow: visible; */ -}