What is the alternate for -webkit-print-color-adjust in firefox and IE

I had some issues with the printing the background colors.

print-color-adjust made the background color issue solved in chrome.

body{
-webkit-print-color-adjust: exact;
}

What are the alternate CSS in firefox and IE for this.

Answers


As mentioned -webkit-print-color-adjust: exact is specific to WebKit browsers, including Google's Chrome and Apple's Safari; therefore the code should work adequately in those aforementioned browsers with perhaps slightly varied results (depending on your site/app styling).

There have been proposals to standardize this snippet to work universally for not just browsers but for different devices too. The code is simplified to: color-adjust. Similarly to the webkit-print-color-adjust property, the possible values are the same for the proposed property economy | exact.

If you want to use the property for printing purposes, simply use within a selector inside a @media print query.

I cannot guarantee the widespread adoption on browsers for the drafted property, however it is currently working on the latest version of FireFox.

[Source]


There is the alternate CSS to print background colors for Chrome And Firefox.

td { 
 -webkit-print-color-adjust: exact;//:For Chrome
  color-adjust: exact;//:For Firefox
}

This is beginning to work in Firefox (at least version 48.0.2) with the "color-adjust" property.

td { 
  background: #000 !important;
  -webkit-print-color-adjust: exact;
  color-adjust: exact;
}

Need Your Help

Crop Image From Center PHP

php image-processing

I want to crop an image from the center in the size 200 * 130 the image to be cropped may vary in size, if the image is smaller we wont crop it i know how to this part where i can check height and...

PhoneGap: How to set Build and Version Property in Config.xml for iOS?

javascript ios html5 cordova

An iOS app has a version an a build number. When using config.xml of a PhoneGap/Cordova project I can set