Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 400
Shan Khan Avatar asked Feb 25 '16 10:02

Shan Khan


People also ask

What is the replacement for IE?

With improved security, privacy, speed, and ease of use, Microsoft Edge surpasses the experience you've come to know with Internet Explorer. When you make the switch to Microsoft Edge, we'll automatically import your favorites, preferences, and other browsing data from Internet Explorer.

What is Chrome IE and Firefox called?

Definition of a "web browser" and links to support websites for further information and help. "A web browser, or simply 'browser,' is an application used to access and view websites. Common web browsers include Microsoft Edge, Internet Explorer, Google Chrome, Mozilla Firefox, and Apple Safari.

Does Firefox have an IE mode?

Firefox does not have an equivalent option. You can install an add-on that will switch to the IE rendering engine for sites that do not display properly in Firefox. It does this by opening IE within a Firefox tab.

Is IE same as Edge?

The Edge icon, a blue letter "e," is similar to the Internet Explorer icon, but they are separate applications. To open Internet Explorer, open the Windows menu in the lower left corner of your screen and begin typing "Internet Explorer." IE will pop up in a search menu. Simply click on it to open.


Video Answer


2 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.

For example:

@media print {   body { color-adjust: exact; } } 

I cannot guarantee the widespread adoption on browsers for the drafted property, however it is currently working on the latest version of FireFox (at the time of writing, version 50.0).

[Source]

like image 146
aullah Avatar answered Sep 20 '22 04:09

aullah


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 } 
like image 22
Jomal Johny Avatar answered Sep 24 '22 04:09

Jomal Johny