diff --git a/src/lib/style-properties.html b/src/lib/style-properties.html index 7840b2998c..97a3f9aad6 100644 --- a/src/lib/style-properties.html +++ b/src/lib/style-properties.html @@ -290,7 +290,7 @@ var cssBuild = scope.__cssBuild || style.__cssBuild; if (cssBuild === 'shady') { // :root -> x-foo > *.x-foo for elements and html for custom-style - isRoot = parsedSelector === (hostScope + '> *.' + hostScope) || parsedSelector.indexOf('html') !== -1; + isRoot = parsedSelector === (hostScope + ' > *.' + hostScope) || parsedSelector.indexOf('html') !== -1; // :host -> x-foo for elements, but sub-rules have .x-foo in them isHost = !isRoot && parsedSelector.indexOf(hostScope) === 0; } @@ -314,7 +314,8 @@ hostScope ); } - selectorToMatch = rule.transformedSelector || hostScope; + // parsedSelector fallback for 'shady' css build + selectorToMatch = rule.transformedSelector || rule.parsedSelector; } callback({ selector: selectorToMatch,