I have a page where I am printing a <h2>
with white color.
When I try to print that <h2>
in other color like red, green, blue etc. It prints correctly (correct color), but when I add code to print it in white color it changes and prints in black.
.text-container {
position: relative;
}
.text {
position: fixed;
width: 100%;
bottom: 0;
background-color: #000000 !important;
opacity: 0.5;
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
h2,
h3 {
color: #ffffff !important;
margin: 0.05208in;
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
<div class="text-container">
<div class="text-center text">
<h2>Som Text</h2>
<h3>Some more text</h3>
<h3>Some more text</h3>
</div>
</div>
This is my code.
Even I test text with simple <p>
tag it reflects the same issue. It works perfectly on chrome.