From 5b8bb36168161fd92cfb63f9dddeab3e10a23bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 22 Aug 2011 15:01:54 +0200 Subject: [PATCH] Add forgotten file --- libraries/theme.lib.php | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 libraries/theme.lib.php diff --git a/libraries/theme.lib.php b/libraries/theme.lib.php new file mode 100644 index 0000000000..9155a6d69b --- /dev/null +++ b/libraries/theme.lib.php @@ -0,0 +1,44 @@ += 6 && PMA_USR_BROWSER_VER <= 8 + ? 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="' . $start_color . '", endColorstr="' . $end_color . '");' + : ''; +} + +/** + * Remove filter for IE. + */ +function PMA_ieClearFilter() { + return PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 6 && PMA_USR_BROWSER_VER <= 8 + ? 'filter: none' + : ''; +} + +/** + * Generates code for CSS gradient using various browser extensions. + */ +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[] = PMA_ieFilter($start_color, $end_color); + return implode("\n", $result); +} + +?>