Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@media print {color#999999;} not recognized in Fire Fox

Tags:

css

firefox

It seems to me that Firefox doesn't correctly handle an instruction in a CSS file. I might be wrong, the I'd like to correct me on this.

Here's the relevant portion of my CSS:

@media print {
  div.entry a:link {
    text-decoration:none;
    color:#999;
  }
}

When I print my page, the links are printed in black, regardless of the value after the color: instruction if the color is given in hexadecimal representation as above.

Interestingly, if I change the line to something like color:yellow; then the links are printed in yellow. Also, Internet Explorer prints the links in grey (#999). So, I conclude this must be a bug with Firefox. If it is not, please let me know.

I am usinf FF 3.6

like image 785
René Nyffenegger Avatar asked Feb 27 '23 13:02

René Nyffenegger


1 Answers

It is not related to @media print or hex representation, but Firefox changing all gray color into black. You could try removing the @media or changing the color to #ff0 or gray to see that these are irrelevant.

The whole gray channel is mapped to black, probably to ensure white-on-black text can be readable when printed without the background.

This problem has been reported in https://bugzilla.mozilla.org/show_bug.cgi?id=470854 but it seems no one cares. See http://www.sanbeiji.com/archives/953 for detail (although it says "it is fixed in Firefox 3", it is not).

like image 52
kennytm Avatar answered Mar 02 '23 18:03

kennytm