From: Prateek Saxena Date: Sun, 2 Mar 2014 04:08:24 +0000 (+0530) Subject: mediawiki.debug: Migrate CSS to LESS X-Git-Tag: 1.31.0-rc.0~16742^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=ee5047c71f6c455b406c124cffc1fbf0b2eea134 mediawiki.debug: Migrate CSS to LESS (first step to make some minor design changes to the debug toolbar) Change-Id: I5232ebec65f5ba10a68fc531ce3647ebc4768ccb --- diff --git a/resources/Resources.php b/resources/Resources.php index 7c13ea667a..b1ba4b39e3 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -759,7 +759,7 @@ return array( ), 'mediawiki.debug' => array( 'scripts' => 'resources/mediawiki/mediawiki.debug.js', - 'styles' => 'resources/mediawiki/mediawiki.debug.css', + 'styles' => 'resources/mediawiki/mediawiki.debug.less', 'dependencies' => 'jquery.footHovzer', 'position' => 'bottom', ), diff --git a/resources/mediawiki/mediawiki.debug.css b/resources/mediawiki/mediawiki.debug.css deleted file mode 100644 index 513cb8475b..0000000000 --- a/resources/mediawiki/mediawiki.debug.css +++ /dev/null @@ -1,183 +0,0 @@ -.mw-debug { - width: 100%; - background-color: #eee; - border-top: 1px solid #aaa; -} - -.mw-debug pre { - font-size: 11px; - padding: 0; - margin: 0; - background: none; - border: none; -} - -.mw-debug table { - border-spacing: 0; - width: 100%; - table-layout: fixed; -} - -.mw-debug table tr { - background-color: #fff; -} - -.mw-debug table tr:nth-child(even) { - background-color: #f9f9f9; -} - -.mw-debug table td, .mw-debug table th { - padding: 4px 10px; -} - -.mw-debug table td { - border-bottom: 1px solid #eee; - word-wrap: break-word; -} - -.mw-debug table td.nr { - text-align: right; -} - -.mw-debug table td span.stats { - color: #808080; -} - -.mw-debug ul { - margin: 0; - list-style: none; -} - -.mw-debug li { - padding: 4px 0; - width: 100%; -} - -.mw-debug-bits { - text-align: center; - border-bottom: 1px solid #aaa; -} - -.mw-debug-bit { - display: inline-block; - padding: 10px 5px; - font-size: 13px; - /* IE-hack for display: inline-block */ - zoom: 1; - *display:inline; -} - -.mw-debug-panelink { - background-color: #eee; - border-right: 1px solid #ccc; -} - -.mw-debug-panelink:first-child { - border-left: 1px solid #ccc; -} - -.mw-debug-panelink:hover { - background-color: #fefefe; - cursor: pointer; -} -.mw-debug-panelink.current { - background-color: #dedede; - -} -a.mw-debug-panelabel, -a.mw-debug-panelabel:visited { - color: #000; -} - -.mw-debug-pane { - height: 300px; - overflow: scroll; - display: none; - font-size: 11px; - background-color: #e1eff2; - box-sizing: border-box; -} - -#mw-debug-pane-debuglog, -#mw-debug-pane-request { - padding: 20px; -} - -#mw-debug-pane-request table { - width: 100%; - margin: 10px 0 30px; -} - -#mw-debug-pane-request tr, -#mw-debug-pane-request th, -#mw-debug-pane-request td, -#mw-debug-pane-request table { - border: 1px solid #D0DBB3; - border-collapse: collapse; - margin: 0; -} - -#mw-debug-pane-request th, -#mw-debug-pane-request td { - font-size: 12px; - padding: 8px 10px; -} - -#mw-debug-pane-request th { - background-color: #F1F7E2; - font-weight: bold; -} - -#mw-debug-pane-request td { - background-color: white; -} - -#mw-debug-console tr td:first-child { - font-weight: bold; - vertical-align: top; -} - -#mw-debug-console tr td:last-child { - vertical-align: top; -} - -.mw-debug-console-log { - background-color: #add8e6; -} - -.mw-debug-console-warn { - background-color: #ffa07a; -} - -.mw-debug-console-deprecated { - background-color: #ffb6c1; -} - -.mw-debug-backtrace { - padding: 5px 10px; - margin: 5px; - background-color: #dedede; -} - -.mw-debug-backtrace span { - font-weight: bold; - color: #111; -} - -.mw-debug-backtrace ul { - padding-left: 10px; -} - -.mw-debug-backtrace li { - width: auto; - padding: 0; - color: #333; - font-size: 10px; - margin-bottom: 0; - line-height: 1em; -} - -/* Cheapo hack to hide the first 3 lines of the backtrace */ -.mw-debug-backtrace li:nth-child(-n+3) { - display: none; -} diff --git a/resources/mediawiki/mediawiki.debug.less b/resources/mediawiki/mediawiki.debug.less new file mode 100644 index 0000000000..949c558614 --- /dev/null +++ b/resources/mediawiki/mediawiki.debug.less @@ -0,0 +1,189 @@ +.mw-debug { + width: 100%; + background-color: #eee; + border-top: 1px solid #aaa; + + pre { + font-size: 11px; + padding: 0; + margin: 0; + background: none; + border: none; + } + + table { + border-spacing: 0; + width: 100%; + table-layout: fixed; + + td, + th { + padding: 4px 10px; + } + + td { + border-bottom: 1px solid #eee; + word-wrap: break-word; + + &.nr { + text-align: right; + } + + span.stats { + color: #808080; + } + } + + tr { + background-color: #fff; + + &:nth-child(even) { + background-color: #f9f9f9; + } + } + } + + ul { + margin: 0; + list-style: none; + } + + li { + padding: 4px 0; + width: 100%; + } +} + +.mw-debug-bits { + text-align: center; + border-bottom: 1px solid #aaa; +} + +.mw-debug-bit { + display: inline-block; + padding: 10px 5px; + font-size: 13px; + /* IE-hack for display: inline-block */ + zoom: 1; + *display:inline; +} + +.mw-debug-panelink { + background-color: #eee; + border-right: 1px solid #ccc; + + &:first-child { + border-left: 1px solid #ccc; + } + + &:hover { + background-color: #fefefe; + cursor: pointer; + } + + &.current { + background-color: #dedede; + } +} + +a.mw-debug-panelabel, +a.mw-debug-panelabel:visited { + color: #000; +} + +.mw-debug-pane { + height: 300px; + overflow: scroll; + display: none; + font-size: 11px; + background-color: #e1eff2; + box-sizing: border-box; +} + +#mw-debug-pane-debuglog, +#mw-debug-pane-request { + padding: 20px; +} + +#mw-debug-pane-request { + table { + width: 100%; + margin: 10px 0 30px; + } + + tr, + th, + td, + table { + border: 1px solid #D0DBB3; + border-collapse: collapse; + margin: 0; + } + + th, + td { + font-size: 12px; + padding: 8px 10px; + } + + th { + background-color: #F1F7E2; + font-weight: bold; + } + + td { + background-color: white; + } +} + +#mw-debug-console tr td { + &:first-child { + font-weight: bold; + vertical-align: top; + } + + &:last-child { + vertical-align: top; + } +} + +.mw-debug-backtrace { + padding: 5px 10px; + margin: 5px; + background-color: #dedede; + + span { + font-weight: bold; + color: #111; + } + + ul { + padding-left: 10px; + } + + li { + width: auto; + padding: 0; + color: #333; + font-size: 10px; + margin-bottom: 0; + line-height: 1em; + } +} + +.mw-debug-console-log { + background-color: #add8e6; +} + +.mw-debug-console-warn { + background-color: #ffa07a; +} + +.mw-debug-console-deprecated { + background-color: #ffb6c1; +} + +/* Cheapo hack to hide the first 3 lines of the backtrace */ +.mw-debug-backtrace li:nth-child(-n+3) { + display: none; +}