How to prevent CSS declaration dropped errors cros

2020-06-09 04:12发布

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?

2条回答
beautiful°
2楼-- · 2020-06-09 04:36

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

查看更多
混吃等死
3楼-- · 2020-06-09 04:42
  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.

查看更多
登录 后发表回答