rodneyrehm / viewport-units-buggyfill

Making viewport units (vh|vw|vmin|vmax) work properly in Mobile Safari.
MIT License
1.59k stars 151 forks source link

Relative path issue #105

Closed ryanburnette closed 6 years ago

ryanburnette commented 6 years ago

I've got an issue for you. I include fonts from my own CDN sometimes. They have relative URL's in there that work when they're CSS, but when this library loads them it looks like the browser thinks the relative paths should be relative to the current host.

Probably related to the XHR loading of CSS.

If you're interested I should be able to whip up a reduced complexity example.

rodneyrehm commented 6 years ago

Can you separate the fonts into their own stylesheet? then you can exclude that from processing as the docs suggest:

To exempt certain stylesheets from being processed, the attribute data-viewport-units-buggyfill="ignore":

<link rel="stylesheet" href="file-to-ignore.css" data-viewport-units-buggyfill="ignore">
<link rel="stylesheet" href="file-to-process.css">
ryanburnette commented 6 years ago

It looks like the best approach might be to put the styles that need the buggyfill right in the head and ignore all external stylesheets.