LeaVerou/prefixfree — Issue #30: PrefixFree breaks on pages that reference non-existent stylesheets
Author: daGUY
Created: 2011-12-09 00:36:32+00:00
State: open

I discovered a very odd issue with PrefixFree while developing a site recently. On only certain pages of my site, when the script was present, an *additional* set of styles would get loaded that conflicted with the rest of the styles on the page and completely messed up the layout.

By diffing pages that worked fine with PrefixFree against those that didn't, I discovered that all the pages that weren't working were referencing stylesheets that no longer existed. In other words, on a broken page, I would have something like ``, but nothing called `template.css` in the `css` directory. Upon removing these references, the pages immediately began rendering correctly again.

The strangest part is that I couldn't determine where those additional styles were coming from. I copied them out of Firebug and searched for them across my entire project, and found nothing that was defining them anywhere. The only thing I could think of was that PrefixFree was acting on cached versions of the stylesheets that no longer existed - but I looked at old versions from before they had been removed, and nothing inside them matched the additional styles I was seeing through Firebug.

I'm not sure if there's anything you can or should do to PrefixFree to address this, since the solution for me was to remove references to non-existent stylesheets - which is good practice anyway - but I wanted to bring it up since it did severely alter the layout/presentation of my pages.