1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 16:33:00 +00:00

Bugfix: Correct CSS rendering

This commit is contained in:
Starbeamrainbowlabs 2019-09-29 16:10:58 +01:00
parent e91852ca68
commit f543321304
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -307,7 +307,7 @@ class page_renderer
global $settings, $defaultCSS; global $settings, $defaultCSS;
$result = ""; $result = "";
$css = "\n"; $css = "";
if(self::is_css_url($settings->css)) { if(self::is_css_url($settings->css)) {
if($settings->css[0] === "/") // Push it if it's a relative resource if($settings->css[0] === "/") // Push it if it's a relative resource
self::add_server_push_indicator("style", $settings->css); self::add_server_push_indicator("style", $settings->css);
@ -328,9 +328,11 @@ class page_renderer
} }
$css .= "\n/*** Custom CSS ***/\n"; $css .= "\n/*** Custom CSS ***/\n";
$css .= !empty($settings->optimize_pages) ? minify_css($settings->css_custom) : $settings->css_custom; $css .= !empty($settings->optimize_pages) ? minify_css($settings->css_custom) : $settings->css_custom;
$css .= "\n/******************/\n"; $css .= "\n/******************/";
} }
$result .= "<style>$css</style>\n"; $result .= "<style>\n$css\n</style>\n";
return $result;
} }