From 9f2ef85f9580671de796b401bb74ec70e10fd987 Mon Sep 17 00:00:00 2001 From: emaktech Date: Tue, 4 Feb 2020 01:10:08 -0500 Subject: [PATCH] Add Option for Radial Gradient (#5140) Adds ability to set the background to be a centered circular radial gradient If the following is set: theme > background_radial_gradient > text Then the radial gradient will be enabled. If not set, it will use linear gradient to preserve previous behavior. --- themes/default/css.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/themes/default/css.php b/themes/default/css.php index 1e6a0e3580..28799a8750 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -151,6 +151,11 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; else if ($background_colors[0] == '' && $background_colors[1] != '') { // use color 2 $background_color = "background: ".$background_colors[1].";"; } + else if ($background_colors[0] != '' && $background_colors[1] != '' && isset($_SESSION['theme']['background_radial_gradient']['text'])) { // radial gradient + $background_color = "background: ".$background_colors[0].";\n"; + $background_color .= "background: -ms-radial-gradient(center, circle, ".$background_colors[0]." 0%, ".$background_colors[1]." 100%);\n"; + $background_color .= "background: radial-gradient(circle at center, ".$background_colors[0]." 0%, ".$background_colors[1]." 100%);\n"; + } else if ($background_colors[0] != '' && $background_colors[1] != '') { // vertical gradient $background_color = "background: ".$background_colors[0].";\n"; $background_color .= "background: -ms-linear-gradient(top, ".$background_colors[0]." 0%, ".$background_colors[1]." 100%);\n";