aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Serwin <[email protected]>2022-11-05 02:13:02 +0100
committerGitHub <[email protected]>2022-11-04 18:13:02 -0700
commit347fe4911569dcb5301ca29ff2adc31d961f44a1 (patch)
tree4b6d71878d538ad476e46ab208202ce711c19995
parentaaac5eb7ecb96850093872c9c9607742936bebf3 (diff)
Change default background color of PDFs generated via HTML (#8422)
* Change default background color of PDFs generated via HTML * Update tests
-rw-r--r--data/templates/styles.html3
-rw-r--r--test/lhs-test.html3
-rw-r--r--test/lhs-test.html+lhs3
-rw-r--r--test/writer.html43
-rw-r--r--test/writer.html53
5 files changed, 15 insertions, 0 deletions
diff --git a/data/templates/styles.html b/data/templates/styles.html
index 11d2e0486..c21f1acab 100644
--- a/data/templates/styles.html
+++ b/data/templates/styles.html
@@ -28,6 +28,9 @@ body {
}
}
@media print {
+ html {
+ background-color: $if(backgroundcolor)$$backgroundcolor$$else$white$endif$;
+ }
body {
background-color: transparent;
color: black;
diff --git a/test/lhs-test.html b/test/lhs-test.html
index c5637d7da..b8e5efca7 100644
--- a/test/lhs-test.html
+++ b/test/lhs-test.html
@@ -35,6 +35,9 @@
}
}
@media print {
+ html {
+ background-color: white;
+ }
body {
background-color: transparent;
color: black;
diff --git a/test/lhs-test.html+lhs b/test/lhs-test.html+lhs
index f51f8d5bd..492fe2fa1 100644
--- a/test/lhs-test.html+lhs
+++ b/test/lhs-test.html+lhs
@@ -35,6 +35,9 @@
}
}
@media print {
+ html {
+ background-color: white;
+ }
body {
background-color: transparent;
color: black;
diff --git a/test/writer.html4 b/test/writer.html4
index 017da7d1e..e51ce0674 100644
--- a/test/writer.html4
+++ b/test/writer.html4
@@ -38,6 +38,9 @@
}
}
@media print {
+ html {
+ background-color: white;
+ }
body {
background-color: transparent;
color: black;
diff --git a/test/writer.html5 b/test/writer.html5
index 190288769..23df9ba80 100644
--- a/test/writer.html5
+++ b/test/writer.html5
@@ -38,6 +38,9 @@
}
}
@media print {
+ html {
+ background-color: white;
+ }
body {
background-color: transparent;
color: black;