From ccbefbb5ef143816992fc71a278f555e9d3687cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 22 Aug 2011 15:09:21 +0200 Subject: [PATCH] Adjust calling convention, do not include # in color --- libraries/theme.lib.php | 17 +++++++++++++---- themes/original/css/theme_right.css.php | 2 +- themes/pmahomme/css/theme_right.css.php | 22 +++++++++++----------- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/libraries/theme.lib.php b/libraries/theme.lib.php index 9155a6d69b..ac000f2087 100644 --- a/libraries/theme.lib.php +++ b/libraries/theme.lib.php @@ -9,16 +9,20 @@ /** * Gradient filter for IE. + * + * @return string CSS code. */ function PMA_ieFilter($start_color, $end_color) { return PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 6 && PMA_USR_BROWSER_VER <= 8 - ? 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="' . $start_color . '", endColorstr="' . $end_color . '");' + ? 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#' . $start_color . '", endColorstr="#' . $end_color . '");' : ''; } /** * Remove filter for IE. + * + * @return string CSS code. */ function PMA_ieClearFilter() { return PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 6 && PMA_USR_BROWSER_VER <= 8 @@ -28,15 +32,20 @@ function PMA_ieClearFilter() { /** * Generates code for CSS gradient using various browser extensions. + * + * @param string $start_color Color of gradient start, hex value without # + * @param string $end_color Color of gradient end, hex value without # + * + * @return string CSS code. */ function PMA_css_Gradied($start_color, $end_color) { $result = array(); $result[] = 'background-image: url(./themes/svg_gradient.php?from=' . $start_color . '&to=' . $end_color . ');'; $result[] = 'background-size: 100% 100%;'; - $result[] = 'background: -webkit-gradient(linear, left top, left bottom, from(' . $start_color . '), to(' . $end_color . '));'; - $result[] = 'background: -moz-linear-gradient(top, ' . $start_color . ', ' . $end_color . ');'; - $result[] = 'background: -o-linear-gradient(top, ' . $start_color . ', ' . $end_color . ');'; + $result[] = 'background: -webkit-gradient(linear, left top, left bottom, from(#' . $start_color . '), to(#' . $end_color . '));'; + $result[] = 'background: -moz-linear-gradient(top, #' . $start_color . ', #' . $end_color . ');'; + $result[] = 'background: -o-linear-gradient(top, #' . $start_color . ', #' . $end_color . ');'; $result[] = PMA_ieFilter($start_color, $end_color); return implode("\n", $result); } diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 1cb074ce83..69d01c1a6e 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1671,7 +1671,7 @@ table#serverconnection_trg_local { -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; - + border: 1px solid #444444; cursor: pointer; } diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index d5a2019e03..9e256386f3 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -105,7 +105,7 @@ a:hover { -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; - + } dfn { @@ -121,7 +121,7 @@ th { font-weight: bold; color: ; background: #f3f3f3; - + } a img { @@ -190,11 +190,11 @@ input[type=submit]{ text-shadow: 0 1px 0 #fff; - + } input[type=submit]:hover{position: relative; - + cursor:pointer; } @@ -289,7 +289,7 @@ select{ } select[multiple] { - + } /* Icon sprites */ @@ -1598,10 +1598,10 @@ div#profilingchart { -moz-box-shadow: 1px 1px 2px rgba(0,0,0,.5); text-shadow: #fff 0 1px 0; */ - + } #sectionlinks a:hover, .buttonlinks a:hover, a.button:hover { - + } div#sqlquerycontainer { @@ -2018,11 +2018,11 @@ input[type=text].invalid_value, text-shadow: 0 1px 0 #fff; - + cursor: pointer; } #buttonGo:hover{ - + } .format_specific_options h3 { @@ -2857,7 +2857,7 @@ span.cm-number { -webkit-border-radius: 5px; -moz-border-radius: 5px; - + } .navigation td { @@ -2894,7 +2894,7 @@ span.cm-number { cursor: pointer; text-shadow: none; - + } .navigation select {