« CSS Comments: Subtle Digs and Some Frustration Expresesd | Main | New Flickr Widget »
December 12, 2005
CSS hacks, and the Firefox Error Console
I've been keeping an eye out for comments about our reskinned site this last week - as always with a big change like this, people have stong opinions. Looking through some comments on digg.com I came across this:
And what a load of CSS errors. Use Firefox 1.5 and open the JavaScript console, then view macromedia.com. Egads.
So I did just that, and did indeed see a host of CSS errors - mostly all the hacks we've used to get the site to work cross browsers (Dan Cederholm prefers the term "patch" and others seem to like "filter"). Many of the errors are caused by a missing space in the well documented * html hack which we'll be fixing shortly.
CSS3 Syntax, and Root as a Pseudo-Element
Here is another error that shows up:
Error: Expected pseudo-element but found 'root'. Ruleset ignored due to bad selector.
This error is caused by the code ::root, which we use to filter to Safari. Since Firefox doesn't recognize the the selector, it's not entirely surprising that it thinks it's an error. The double colon is CSS3 syntax for a pseudo-element, but it seems that root is not an acceptable pseudo-element (more info here). The useful MacEdition guide to CSS3 Selector Support shows only Safari supports the double colon syntax, and perhaps it's just a bug that it interprets root as a pseudo-element.
In any case, it's a very useful hack to send styles to Safari (here's a test page if you want to see it in action), and I can live with the error for now (that is the pragmatic part of my job).
What are CSS Errors Doing in the Firefox 1.5 JavaScript Console Anyway?
The original complaint from digg.com did call my attention to something I hadn't noticed before: the presence of CSS errors in the Firefox 1.5 JavaScript console. Apparently this is a new feature (more info here from Google), useful for finding CSS errors, but annoying if you're debugging a lot of JavaScript. It would have been helpful if there was a preference that allowed you to turn show only JS errors, I may need to look into the excellent sounding Console² extension.
Posted by nstraghalis at December 12, 2005 12:01 PM
Comments
Using ::root to filter for Safai fails in TOT WebKit. http://webkit.org
Posted by: Timothy Hatcher at February 3, 2006 03:42 PM
i have a problem too in my firefox, when i go to tools and option, privacy tab my firefox crash, and error appear. I've done everything unistall install, hardisk cleanup, unistall java nothing happen. firefox crash.
I got this idea go to C:\windows, application Data
folder, try deleting java and mozilla folder. Wow My firefox working now, even i go to privacy tab it wont crash again.
I hope it help's some people having the same problem as mine
thanks
Posted by: ebaks at April 3, 2006 04:51 PM
oh sory i forgot before deleting java and mozilla folder be sure u unistall firefox first after that deleting process install firefox again thx
Posted by: ebaks at April 3, 2006 04:54 PM