You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>According to <ahref="http://caniuse.com/#feat=css-variables">caniuse.com</a>, of current browsers only IE, Edge 12-15 and Opera Mini do not support CSS variables. This polyfil appears to work on all three really well. I don't see why this wouldn't work on older browsers as well, but I haven't been able to test it on them yet.</p>
21
23
22
24
<p>As far as we can tell your browser <spanclass="supports">does <spanclass="no">not</span> support</span> native CSS variables. <spanclass="showforpolyfill">That means if you see green tests results below, it is thanks to the polyfill :).</span><spanclass="hideforpolyfill">All the green test results below are actually native CSS Variable support. Good job using a good browser :)</span></p>
23
-
25
+
24
26
<h3>Does this work on externally CSS files?</h3>
25
27
<p>Yes!</p>
26
28
<h3>Even ones loaded from another domain?</h3>
@@ -33,10 +35,15 @@ <h3>Even ones loaded from another domain?</h3>
33
35
:root {
34
36
--newcolor:#0f0;
35
37
}
36
-
38
+
37
39
.inlineoverlink {
38
40
color:var(--success2);
39
41
}
42
+
43
+
.html-import-vars {
44
+
color:var(--import-white);
45
+
background-color:var(--import-purple);
46
+
}
40
47
</style>
41
48
<h2>Tests</h2>
42
49
<p>On mosts tests (unless otherwise noted) success will be green text. We start with a <code>color:red;</code> and then override it with a <code>color:var(--success);</code> (or similar) which is green.</p>
<li><spanclass="demo-import">css declared in an <code>@import</code></span> - not polyfilled yet. <ahref="https://gist.github.com/stramel/91d05253f801f771da38b3bc7d3c765f#gistcomment-2258818">Identfied with a suggested fix</a>, but will require a bit of a re-write (to use document.styleSheets), so haven't done it yet.</li>
53
60
</ul>
54
-
61
+
55
62
56
63
<h2>Tests on external, cross-domain file</h2>
57
64
<divclass="documentation">
@@ -66,6 +73,9 @@ <h2>Tests on external, cross-domain file</h2>
66
73
<li><spanclass="externalfallback">uses fallback. should be green</span></li>
67
74
</ul>
68
75
76
+
<h2>HTML imports</h2>
77
+
<pclass="html-import-debug">This text should be purple and bold because it was styled by a style tag in an HTML import. If it's not, your browser is not importing HTML.</p>
78
+
<pclass="html-import-vars">This text should be white on a purple background because of the variables imported from HTML.</p>
69
79
70
80
<p>Another set of text under the test for Opera Mini testing.</p>
0 commit comments