nuxodin / ie11CustomProperties

CSS variables (Custom Properties) polyfill for IE11

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

script failed on local css links

viT-1 opened this issue · comments

** Description **
Just run test.htm directly from disk drive
with css link to local file in same directory.

Error on L636 (fetchCss function): request.open('GET', url);

** Version **
4.1.0

** To Reproduce **
ie11failedVar.css:

[iam-body] {
	--myColor: green;
}

[iam-p] {
	color: var(--myColor);
}

ie11failedVar.htm:

<link rel="stylesheet" type="text/css" href="ie11failedVar.css" />
<script>window.MSInputMethodContext && document.documentMode && document.write('<script src="https://cdn.jsdelivr.net/npm/ie11-custom-properties@4.1.0/ie11CustomProperties.js"><\/script>');</script>
<body iam-body>
	<p iam-p>Test green</p>
	<p>Not green</p>
</body>

Also is failed even in tag <style> if I have any css.link!

<link rel="stylesheet" type="text/css" href="ie11failedVar.css" />
<script>window.MSInputMethodContext && document.documentMode && document.write('<script src="ie11CustomProperties.min.js"><\/script>');</script>
<style>
[iam-body] {
	--myColor2: red;
}

[iam-h] {
	color: var(--myColor2);
}
</style>
<body iam-body>
	<p iam-p>Test green</p>
	<p>Not green</p>
	<h1 iam-h>Test red</h1>
</body>