Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent CSS declaration dropped errors cross browser?

Hi I would like to know how to easily prevent dropped errors from appearing from debugging software such as webdeveloper plugin in Firefox. I get errors such as:

Warning: Error in parsing value for 'filter'. Declaration dropped.

Warning: Error in parsing value for 'font'. Declaration dropped.

I understand I get these errors because Firefox does not support these CSS properties, but how do I drop them before hand so Firefox does not attempt to read them in the first place? I know I can create a separate style sheet for every browser but that is a inconvenience. Is there a simple solution?

like image 571
John Avatar asked Jan 16 '11 20:01

John


2 Answers

  1. I'd always put or import IE-specific styles inside a conditonal comment;

  2. as standard CSS FF should be fine with 'font', so just check your syntax e.g. font: bold 12px/30px Georgia, serif; values separated by spaces, multi-word font names in quotes, etc.

like image 138
Dave Everitt Avatar answered Oct 14 '22 08:10

Dave Everitt


If you are using an IE-specific declaration (like filter), put it in an IE-specific stylesheet. It is simple and easy, and I don't really understand why it would be an incovenience (the inconvenience is IE itself).

Hiding an error does not mean the error is solved (and actually if FF shows an error in font it should be taken care of).

like image 36
kapa Avatar answered Oct 14 '22 08:10

kapa