@webcomponents/shadycss
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"editor.formatOnPaste": true, | ||
"editor.minimap.enabled": true | ||
} |
@@ -15,3 +15,3 @@ (function(){/* | ||
function y(a,b,c){c=void 0===c?"":c;var d="";if(a.cssText||a.rules){var e=a.rules,f;if(f=e)f=e[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var h=e.length,g;f<h&&(g=e[f]);f++)d=y(g,b,d)}else b?b=a.cssText:(b=a.cssText,b=b.replace(ea,"").replace(fa,""),b=b.replace(ga,"").replace(ha,"")),(d=b.trim())&&(d=" "+d+"\n")}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="}\n\n"));return c} | ||
var v=1,u=7,t=4,x=1E3,aa=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,ba=/@import[^;]*;/gim,ea=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,fa=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,ga=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,ha=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,da=/^@[^\s]*keyframes/,r=/\s+/g;var ia=Promise.resolve();function ja(a){if(a=k[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function z(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function ka(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.a||(a.a=!0,ia.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.a=!1}))};var A=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};{])+)|\{([^\}]*)\}(?:(?=[;\s}])|$))/gi,B=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,la=/@media[^(]*(\([^)]*\))/;var C=!(window.ShadyDOM&&window.ShadyDOM.inUse),E;function F(a){E=a&&a.shimcssproperties?!1:C||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?E=window.ShadyCSS.nativeCss:window.ShadyCSS?(F(window.ShadyCSS),window.ShadyCSS=void 0):F(window.WebComponents&&window.WebComponents.flags);var G=E;function H(a){if(!a)return"";"string"===typeof a&&(a=p(a));return y(a,G)}function I(a){!a.__cssRules&&a.textContent&&(a.__cssRules=p(a.textContent));return a.__cssRules||null}function J(a,b,c,d){if(a){var e=!1,f=a.type;if(d&&f===t){var h=a.selector.match(la);h&&(window.matchMedia(h[1]).matches||(e=!0))}f===v?b(a):c&&f===u?c(a):f===x&&(e=!0);if((a=a.rules)&&!e)for(var e=0,f=a.length,g;e<f&&(g=a[e]);e++)J(g,b,c,d)}} | ||
var v=1,u=7,t=4,x=1E3,aa=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,ba=/@import[^;]*;/gim,ea=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,fa=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,ga=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,ha=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,da=/^@[^\s]*keyframes/,r=/\s+/g;var ia=Promise.resolve();function ja(a){if(a=k[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function z(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function ka(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.a||(a.a=!0,ia.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.a=!1}))};var A=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,B=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,la=/@media\s(.*)/;var C=!(window.ShadyDOM&&window.ShadyDOM.inUse),E;function F(a){E=a&&a.shimcssproperties?!1:C||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?E=window.ShadyCSS.nativeCss:window.ShadyCSS?(F(window.ShadyCSS),window.ShadyCSS=void 0):F(window.WebComponents&&window.WebComponents.flags);var G=E;function H(a){if(!a)return"";"string"===typeof a&&(a=p(a));return y(a,G)}function I(a){!a.__cssRules&&a.textContent&&(a.__cssRules=p(a.textContent));return a.__cssRules||null}function J(a,b,c,d){if(a){var e=!1,f=a.type;if(d&&f===t){var h=a.selector.match(la);h&&(window.matchMedia(h[1]).matches||(e=!0))}f===v?b(a):c&&f===u?c(a):f===x&&(e=!0);if((a=a.rules)&&!e)for(var e=0,f=a.length,g;e<f&&(g=a[e]);e++)J(g,b,c,d)}} | ||
function K(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var d=0;var e=c+3;for(var f=a.length;e<f;e++)if("("===a[e])d++;else if(")"===a[e]&&!--d)break a;e=-1}d=a.substring(c+4,e);c=a.substring(0,c);a=K(a.substring(e+1),b);e=d.indexOf(",");return-1===e?b(c,d.trim(),"",a):b(c,d.substring(0,e).trim(),d.substring(e+1).trim(),a)};var ma=/;\s*/m,na=/^\s*(initial)|(inherit)\s*$/;function L(){this.a={}}L.prototype.set=function(a,b){a=a.trim();this.a[a]={h:b,i:{}}};L.prototype.get=function(a){a=a.trim();return this.a[a]||null};var M=null;function N(){this.b=this.c=null;this.a=new L}N.prototype.o=function(a){a=B.test(a)||A.test(a);B.lastIndex=0;A.lastIndex=0;return a};N.prototype.m=function(a,b){a=a.content.querySelector("style");var c=null;a&&(c=this.j(a,b));return c}; | ||
@@ -18,0 +18,0 @@ N.prototype.j=function(a,b){b=void 0===b?"":b;var c=I(a);this.l(c,b);a.textContent=H(c);return c};N.prototype.f=function(a){var b=this,c=I(a);J(c,function(a){":root"===a.selector&&(a.selector="html");b.g(a)});a.textContent=H(c);return c};N.prototype.l=function(a,b){var c=this;this.c=b;J(a,function(a){c.g(a)});this.c=null};N.prototype.g=function(a){a.cssText=oa(this,a.parsedCssText);":root"===a.selector&&(a.selector=":host > *")}; |
@@ -10,6 +10,6 @@ (function(){/* | ||
*/ | ||
'use strict';var c=!(window.ShadyDOM&&window.ShadyDOM.inUse),f;function g(a){f=a&&a.shimcssproperties?!1:c||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?f=window.ShadyCSS.nativeCss:window.ShadyCSS?(g(window.ShadyCSS),window.ShadyCSS=void 0):g(window.WebComponents&&window.WebComponents.flags);var h=f;function k(a,b){for(var d in b)null===d?a.style.removeProperty(d):a.style.setProperty(d,b[d])};var l=null,m=window.HTMLImports&&window.HTMLImports.whenReady||null,q;function r(){var a=t;requestAnimationFrame(function(){m?m(a):(l||(l=new Promise(function(a){q=a}),"complete"===document.readyState?q():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&q()})),l.then(function(){a&&a()}))})};var u=null,t=null;function v(){this.customStyles=[];this.enqueued=!1}function x(a){!a.enqueued&&t&&(a.enqueued=!0,r())}v.prototype.c=function(a){a.__seenByShadyCSS||(a.__seenByShadyCSS=!0,this.customStyles.push(a),x(this))};v.prototype.b=function(a){if(a.__shadyCSSCachedStyle)return a.__shadyCSSCachedStyle;var b;a.getStyle?b=a.getStyle():b=a;return b}; | ||
v.prototype.a=function(){for(var a=this.customStyles,b=0;b<a.length;b++){var d=a[b];if(!d.__shadyCSSCachedStyle){var e=this.b(d);if(e){var n=e.__appliedElement;if(n)for(var p=0;p<e.attributes.length;p++){var w=e.attributes[p];n.setAttribute(w.name,w.value)}e=n||e;u&&u(e);d.__shadyCSSCachedStyle=e}}}return a};v.prototype.addCustomStyle=v.prototype.c;v.prototype.getStyleForCustomStyle=v.prototype.b;v.prototype.processStyles=v.prototype.a; | ||
Object.defineProperties(v.prototype,{transformCallback:{get:function(){return u},set:function(a){u=a}},validateCallback:{get:function(){return t},set:function(a){var b=!1;t||(b=!0);t=a;b&&x(this)}}});var y=new v;window.ShadyCSS||(window.ShadyCSS={prepareTemplate:function(){},styleSubtree:function(a,b){y.a();k(a,b)},styleElement:function(){y.a()},styleDocument:function(a){y.a();k(document.body,a)},getComputedStyleValue:function(a,b){return(a=window.getComputedStyle(a).getPropertyValue(b))?a.trim():""},nativeCss:h,nativeShadow:c});window.ShadyCSS.CustomStyleInterface=y;}).call(this); | ||
'use strict';var c=!(window.ShadyDOM&&window.ShadyDOM.inUse),f;function g(a){f=a&&a.shimcssproperties?!1:c||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?f=window.ShadyCSS.nativeCss:window.ShadyCSS?(g(window.ShadyCSS),window.ShadyCSS=void 0):g(window.WebComponents&&window.WebComponents.flags);var h=f;function k(a,b){for(var d in b)null===d?a.style.removeProperty(d):a.style.setProperty(d,b[d])};var l=null,m=window.HTMLImports&&window.HTMLImports.whenReady||null,n;function p(){var a=q;requestAnimationFrame(function(){m?m(a):(l||(l=new Promise(function(a){n=a}),"complete"===document.readyState?n():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&n()})),l.then(function(){a&&a()}))})};var r=null,q=null;function t(){this.customStyles=[];this.enqueued=!1}function u(a){!a.enqueued&&q&&(a.enqueued=!0,p())}t.prototype.c=function(a){a.__seenByShadyCSS||(a.__seenByShadyCSS=!0,this.customStyles.push(a),u(this))};t.prototype.b=function(a){if(a.__shadyCSSCachedStyle)return a.__shadyCSSCachedStyle;var b;a.getStyle?b=a.getStyle():b=a;return b}; | ||
t.prototype.a=function(){for(var a=this.customStyles,b=0;b<a.length;b++){var d=a[b];if(!d.__shadyCSSCachedStyle){var e=this.b(d);e&&(e=e.__appliedElement||e,r&&r(e),d.__shadyCSSCachedStyle=e)}}return a};t.prototype.addCustomStyle=t.prototype.c;t.prototype.getStyleForCustomStyle=t.prototype.b;t.prototype.processStyles=t.prototype.a; | ||
Object.defineProperties(t.prototype,{transformCallback:{get:function(){return r},set:function(a){r=a}},validateCallback:{get:function(){return q},set:function(a){var b=!1;q||(b=!0);q=a;b&&u(this)}}});var v=new t;window.ShadyCSS||(window.ShadyCSS={prepareTemplate:function(){},styleSubtree:function(a,b){v.a();k(a,b)},styleElement:function(){v.a()},styleDocument:function(a){v.a();k(document.body,a)},getComputedStyleValue:function(a,b){return(a=window.getComputedStyle(a).getPropertyValue(b))?a.trim():""},nativeCss:h,nativeShadow:c});window.ShadyCSS.CustomStyleInterface=v;}).call(this); | ||
//# sourceMappingURL=custom-style-interface.min.js.map |
{ | ||
"name": "@webcomponents/shadycss", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Styling helpers for ShadyDOM", | ||
@@ -40,7 +40,7 @@ "main": "shadycss.min.js", | ||
"@webcomponents/webcomponents-platform": "^1.0.0", | ||
"del": "^2.2.2", | ||
"del": "^3.0.0", | ||
"es6-promise": "^4.1.0", | ||
"eslint": "^3.4.0", | ||
"eslint-plugin-html": "^2.0.0", | ||
"google-closure-compiler": "^20170423.0.0", | ||
"eslint": "^4.0.0", | ||
"eslint-plugin-html": "^3.0.0", | ||
"google-closure-compiler": "^20170521.0.0", | ||
"gulp": "^3.8.8", | ||
@@ -47,0 +47,0 @@ "gulp-rename": "^1.2.2", |
@@ -336,3 +336,3 @@ # ShadyCSS | ||
If `ShadyCss.applyStyle` is never called, `<custom-style>` elements will process | ||
If `ShadyCSS.applyStyle` is never called, `<custom-style>` elements will process | ||
after HTML Imports have loaded, after the document loads, or after the next paint. | ||
@@ -345,2 +345,11 @@ This means that there may be a flash of unstyled content on the first load. | ||
update mixins through `<slot>` insertion points to be too expensive to justify for both | ||
polyfilled CSS Mixins and polyfilled CSS Custom Properties. | ||
polyfilled CSS Mixins and polyfilled CSS Custom Properties. | ||
### External stylesheets not currently supported | ||
External stylesheets loaded via `<link rel="stylesheet">` within a shadow root or | ||
`@import` syntax inside a shadow root's stylesheet are not currently shimmed by | ||
the polyfill. This is mainly due to the fact that shimming them would require | ||
a fetch of the stylesheet text that is async cannot be easily coordinated with | ||
the upgrade timing of custom elements using them, making it impossible to avoid | ||
"flash of unstyled content" when running on polyfill. |
@@ -15,3 +15,3 @@ (function(){/* | ||
function ka(a,b,c){c=void 0===c?"":c;var e="";if(a.cssText||a.rules){var d=a.rules,f;if(f=d)f=d[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var g=d.length,h;f<g&&(h=d[f]);f++)e=ka(h,b,e)}else b?b=a.cssText:(b=a.cssText,b=b.replace(la,"").replace(ma,""),b=b.replace(na,"").replace(oa,"")),(e=b.trim())&&(e=" "+e+"\n")}e&&(a.selector&&(c+=a.selector+" {\n"),c+=e,a.selector&&(c+="}\n\n"));return c} | ||
var ia=1,r=7,ga=4,ja=1E3,ba=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,ca=/@import[^;]*;/gim,la=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,ma=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,na=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,oa=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,ha=/^@[^\s]*keyframes/,fa=/\s+/g;var pa=Promise.resolve();function qa(a){if(a=m[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function ra(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function sa(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,pa.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))};var t=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};{])+)|\{([^\}]*)\}(?:(?=[;\s}])|$))/gi,u=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,ta=/(--[\w-]+)\s*([:,;)]|$)/gi,ua=/(animation\s*:)|(animation-name\s*:)/,va=/@media[^(]*(\([^)]*\))/,wa=/\{[^}]*\}/g;var v=!(window.ShadyDOM&&window.ShadyDOM.inUse),w;function xa(a){w=a&&a.shimcssproperties?!1:v||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?w=window.ShadyCSS.nativeCss:window.ShadyCSS?(xa(window.ShadyCSS),window.ShadyCSS=void 0):xa(window.WebComponents&&window.WebComponents.flags);var y=w;function z(a,b){if(!a)return"";"string"===typeof a&&(a=p(a));b&&A(a,b);return ka(a,y)}function B(a){!a.__cssRules&&a.textContent&&(a.__cssRules=p(a.textContent));return a.__cssRules||null}function ya(a){return!!a.parent&&a.parent.type===r}function A(a,b,c,e){if(a){var d=!1,f=a.type;if(e&&f===ga){var g=a.selector.match(va);g&&(window.matchMedia(g[1]).matches||(d=!0))}f===ia?b(a):c&&f===r?c(a):f===ja&&(d=!0);if((a=a.rules)&&!d)for(var d=0,f=a.length,h;d<f&&(h=a[d]);d++)A(h,b,c,e)}} | ||
var ia=1,r=7,ga=4,ja=1E3,ba=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,ca=/@import[^;]*;/gim,la=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,ma=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,na=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,oa=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,ha=/^@[^\s]*keyframes/,fa=/\s+/g;var pa=Promise.resolve();function qa(a){if(a=m[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function ra(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function sa(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,pa.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))};var t=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,u=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,ta=/(--[\w-]+)\s*([:,;)]|$)/gi,ua=/(animation\s*:)|(animation-name\s*:)/,va=/@media\s(.*)/,wa=/\{[^}]*\}/g;var v=!(window.ShadyDOM&&window.ShadyDOM.inUse),w;function xa(a){w=a&&a.shimcssproperties?!1:v||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?w=window.ShadyCSS.nativeCss:window.ShadyCSS?(xa(window.ShadyCSS),window.ShadyCSS=void 0):xa(window.WebComponents&&window.WebComponents.flags);var y=w;function z(a,b){if(!a)return"";"string"===typeof a&&(a=p(a));b&&A(a,b);return ka(a,y)}function B(a){!a.__cssRules&&a.textContent&&(a.__cssRules=p(a.textContent));return a.__cssRules||null}function ya(a){return!!a.parent&&a.parent.type===r}function A(a,b,c,e){if(a){var d=!1,f=a.type;if(e&&f===ga){var g=a.selector.match(va);g&&(window.matchMedia(g[1]).matches||(d=!0))}f===ia?b(a):c&&f===r?c(a):f===ja&&(d=!0);if((a=a.rules)&&!d)for(var d=0,f=a.length,h;d<f&&(h=a[d]);d++)A(h,b,c,e)}} | ||
function C(a,b,c,e){var d=document.createElement("style");b&&d.setAttribute("scope",b);d.textContent=a;za(d,c,e);return d}var D=null;function za(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);D?a.compareDocumentPosition(D)===Node.DOCUMENT_POSITION_PRECEDING&&(D=a):D=a} | ||
@@ -25,3 +25,3 @@ function Aa(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var e=0;var d=c+3;for(var f=a.length;d<f;d++)if("("===a[d])e++;else if(")"===a[d]&&!--e)break a;d=-1}e=a.substring(c+4,d);c=a.substring(0,c);a=Aa(a.substring(d+1),b);d=e.indexOf(",");return-1===d?b(c,e.trim(),"",a):b(c,e.substring(0,d).trim(),e.substring(d+1).trim(),a)}function E(a,b){v?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)} | ||
function Pa(a,b){var c=a.match(Ua);return(c=c&&c[2].trim()||"")?c[0].match(Va)?a.replace(Ua,function(a,c,f){return b+f}):c.split(Va)[0]===b?c:Wa:a.replace(La,b)}function Xa(a){a.selector===Ya&&(a.selector="html")}I.prototype.c=function(a){return a.match(Oa)?this.b(a,Za):Qa(a.trim(),Za)};aa.Object.defineProperties(I.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}}); | ||
var Ja=/:(nth[-\w]+)\(([^)]+)\)/,Za=":not(.style-scope)",Ia=",",Ma=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,Va=/[[.:#*]/,La=":host",Ya=":root",Oa="::slotted",Ka=new RegExp("^("+Oa+")"),Ua=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ra=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Sa=/(.*):dir\((?:(ltr|rtl))\)/,Ga=".",Ta=":",Ea="class",Wa="should_not_match",K=new I;function $a(){} | ||
var Ja=/:(nth[-\w]+)\(([^)]+)\)/,Za=":not(.style-scope)",Ia=",",Ma=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Va=/[[.:#*]/,La=":host",Ya=":root",Oa="::slotted",Ka=new RegExp("^("+Oa+")"),Ua=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ra=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Sa=/(.*):dir\((?:(ltr|rtl))\)/,Ga=".",Ta=":",Ea="class",Wa="should_not_match",K=new I;function $a(){} | ||
function ab(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var e=0;e<c.addedNodes.length;e++){var d=c.addedNodes[e];if(d.nodeType===Node.ELEMENT_NODE){var f=d.getRootNode();var g=d;var h=[];g.classList?h=Array.from(g.classList):g instanceof window.SVGElement&&g.hasAttribute("class")&&(h=g.getAttribute("class").split(/\s+/));g=h;h=g.indexOf(K.a);(g=-1<h?g[h+1]:"")&&f===d.ownerDocument?J(d,g,!0):f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(f= | ||
@@ -28,0 +28,0 @@ f.host)&&(f=F(f).is,g!==f&&(g&&J(d,g,!0),J(d,f)))}}}} |
@@ -11,7 +11,7 @@ /** | ||
export const VAR_ASSIGN = /(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};{])+)|\{([^\}]*)\}(?:(?=[;\s}])|$))/gi; | ||
export const VAR_ASSIGN = /(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi; | ||
export const MIXIN_MATCH = /(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi; | ||
export const VAR_CONSUMED = /(--[\w-]+)\s*([:,;)]|$)/gi; | ||
export const ANIMATION_MATCH = /(animation\s*:)|(animation-name\s*:)/; | ||
export const MEDIA_MATCH = /@media[^(]*(\([^)]*\))/; | ||
export const MEDIA_MATCH = /@media\s(.*)/; | ||
export const IS_VAR = /^--/; | ||
@@ -18,0 +18,0 @@ export const BRACKETED = /\{[^}]*\}/g; |
@@ -89,21 +89,13 @@ /** | ||
processStyles() { | ||
let cs = this['customStyles']; | ||
const cs = this['customStyles']; | ||
for (let i = 0; i < cs.length; i++) { | ||
let customStyle = cs[i]; | ||
const customStyle = cs[i]; | ||
if (customStyle[CACHED_STYLE]) { | ||
continue; | ||
} | ||
let style = this.getStyleForCustomStyle(customStyle); | ||
const style = this.getStyleForCustomStyle(customStyle); | ||
if (style) { | ||
// HTMLImports polyfill may have cloned the style into the main document, | ||
// which is referenced with __appliedElement. | ||
// Also, we must copy over the attributes. | ||
let appliedStyle = /** @type {HTMLStyleElement} */(style['__appliedElement']); | ||
if (appliedStyle) { | ||
for (let i = 0; i < style.attributes.length; i++) { | ||
let attr = style.attributes[i]; | ||
appliedStyle.setAttribute(attr.name, attr.value); | ||
} | ||
} | ||
let styleToTransform = appliedStyle || style; | ||
const styleToTransform = /** @type {!HTMLStyleElement} */(style['__appliedElement'] || style); | ||
if (transformFn) { | ||
@@ -165,2 +157,2 @@ transformFn(styleToTransform); | ||
*/ | ||
export let CustomStyleInterfaceInterface; | ||
export let CustomStyleInterfaceInterface; |
@@ -309,3 +309,3 @@ /** | ||
let COMPLEX_SELECTOR_SEP = ','; | ||
let SIMPLE_SELECTOR_SEP = /(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g; | ||
let SIMPLE_SELECTOR_SEP = /(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g; | ||
let SIMPLE_SELECTOR_PREFIX = /[[.:#*]/; | ||
@@ -312,0 +312,0 @@ let HOST = ':host'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
517691
80
354
3955