@media Print Text-shadow Under Chrome
When I add the css rule 'text-shadow' for text it does not shown in @media print (save as PDF) and it does not work specially under Chrome. It works excellent under IE11 but under
Solution 1:
The solution is -webkit-filter: drop-shadow(4px 4px 1px #ccc).
Here is the example:
@media print {
/* CSS only for Chrome */@media print and (-webkit-min-device-pixel-ratio:0) {
.item { -webkit-filter: drop-shadow(4px4px1px#ccc); }
}
}
And if you need multiple text-shadows use it:
.item {
-webkit-filter: drop-shadow(1px00#fff) drop-shadow(01px0#fff);
}
Here is the final CSS:
@media print {
.item {
-webkit-filter: drop-shadow(4px4px1px#ccc);
text-shadow: 4px4px1px#ccc;
}
}
Solution 2:
The solution provided by Nazar doesn´t seem to work on Chrome version 51.0.2704.103 m, I´m afraid. I can see the text-shadow using the debug menu "Rendering > Emulate media" and enabling the print mode. But when trying to print (actually saving as PDF) the shadows are not visible anymore. Also, I had to add this to make the text visible in the print preview:
-webkit-transform: translate3d(0,0,0) !important;
Post a Comment for "@media Print Text-shadow Under Chrome"