All stylesheet links are converted to data-href

By  | 

I’m working on a page when I stumbled into a weird issue which can be replicated on all browsers I have (Chrome, Firefox and IE). All the stylesheet links were added into a data-href and it was converted into inpage css which is hard to debug. When I view-source the page, the stylesheets were added fine like this one:

<link rel="stylesheet" href="http://sample.com/wp-content/themes/sample/style.css" media="screen" />

But for some reason when you inspect the elements via browser inspector, it was converted to the following:

<style media="screen" data-href="http://sample.com/wp-content/themes/sample/style.css">
All the styles were added in this area
</style>

I was stuck on that for a while. I even thought it’s a wordpress issue but then I found they were using the following javascript.

https://raw.githubusercontent.com/LeaVerou/prefixfree/gh-pages/prefixfree.min.js

I just removed it and voila! everything is back to normal.

Like Us On Facebook

Leave a Reply

Your email address will not be published. Required fields are marked *