Wednesday, 13. Sep 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.

One comment to “Safari CSS parser bug”

  1. This rule is also fatal to the parser:

    .class .class {
    /*color/**/:red;*/
    }

    Borgar wrote 22.1.2007 10:10


This page

Archives

Search this page


Page style: Use my settings