Skip to content

Instantly share code, notes, and snippets.

@frenkel
frenkel / css-var-polyfill.js
Last active May 15, 2017 14:02
CSS Variable Polyfill
/*
TODO:
- Option to wait to apply anything until all <link>s are parsed or inject what we have and update as each <link> returns
*/
var cssVarPoly = {
init: function() {
if (window.CSS && window.CSS.supports && window.CSS.supports('(--foo: red)')) {
return;
}
cssVarPoly.ratifiedVars = {};