From 75f92c2adec0f58255465b7caf2ea9bab05e697b Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Mon, 31 Jan 2022 22:54:59 +0100 Subject: [PATCH] Explicitly set white background for tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the release of Little CMS 2.13, Ghostscript sets a grey background when generating raster images with no alpha channel. It’s probably a bug in Ghostscript or in Little CMS, but the specification gives the possibility to PDF renderers to choose the backdrop color (even if most of them use white). Setting a white background for tests fixes this problem. We keep the transparent background in the normal user agent for compatibility purpose, and users will be able to set a white background if they need a "workaround". --- weasyprint/css/tests_ua.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weasyprint/css/tests_ua.css b/weasyprint/css/tests_ua.css index 1d83fea4e..99422ee1b 100644 --- a/weasyprint/css/tests_ua.css +++ b/weasyprint/css/tests_ua.css @@ -1,7 +1,7 @@ /* Simplified user-agent stylesheet for HTML5 in tests. */ -@page { bleed: 0; @footnote { margin: 0 } } +@page { background: white; bleed: 0; @footnote { margin: 0 } } html, body, div, h1, h2, h3, h4, ol, p, ul, hr, pre, section, article { display: block; } li { display: list-item }