2

I've been using the excellent PrefixFree on all my sites recently, and in general it works like a charm. But today I discovered a very, very strange issue - on only a few pages of my site, when the script is present, an additional set of styles get loaded that conflict with the rest of the styles on the page and completely mess up the layout.

I cannot determine where these additional styles are coming from - they are not part of any of the stylesheets that I'm linking to on these particular pages. If I remove PrefixFree from the page or comment it out, they disappear immediately and everything displays correctly again.

As I understand it, PrefixFree works by looking for <link> and <style> elements on the current page and parsing them. So how on earth can it be causing additional styles to apply to the page that don't otherwise exist??

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
daGUY
  • 27,055
  • 29
  • 75
  • 119
  • I suggest you submit a bug report: https://github.com/LeaVerou/prefixfree/issues – js-coder Dec 07 '11 at 22:28
  • I should add also that I can see the extra styles in Firebug and manually disable them, but I can't determine what stylesheet they're coming from. After PrefixFree does its processing, the styles appear to be inserted inline on the page, so Firebug can't determine where they originated from. – daGUY Dec 08 '11 at 14:09
  • Bug report submitted: https://github.com/LeaVerou/prefixfree/issues/30 – daGUY Dec 09 '11 at 17:13

1 Answers1

1

Ah ha! I discovered that the pages with the "phantom" styles were referring to two stylesheets that no longer exist. I removed the references to those stylesheets and now the pages display correctly, with the script still in place.

On the one hand, that solves the problem; on the other, I still have no idea where those extra styles were coming from. They weren't part of the stylesheets that were removed, so it's not even like the script was acting off of cached copies or anything. I still can't find any trace of those styles anywhere across my site.

Bizarre, but I'll consider this solved since it does fix my problem!

daGUY
  • 27,055
  • 29
  • 75
  • 119
  • 1
    When the page requests the nonexistent stylesheets, my server returns a 404 page for each one. PrefixFree thinks these 404 pages are the stylesheets that were requested and inserts them onto the page between ` – daGUY Dec 15 '11 at 14:35