Borgar.net

— Go straight to page navigation

13. September 2006

Safari CSS parser bug

Here is a Safari CSS parser bug I found today:

.i {border:0;.i}

Put this invalid code anywhere in your css file and the parser will come to a grinding halt and look no further down the file. Another fine reason to validate your code.

This may work as a hack as things placed below it will not show up in Safari 2.0.4 (419.3). I wouldn't recommend it though. I haven't done much testing but a recent Konqueror I hastily tried it on was unaffected.

Expected behaviour is that the browser ignores the text following the ; and perhaps the next rule following until it finds ; or } again.

Published: 13. September 2006. Tagged: , , , , , .