diff --git a/src/lib/style-transformer.html b/src/lib/style-transformer.html
index 94775b5589..60503fe75e 100644
--- a/src/lib/style-transformer.html
+++ b/src/lib/style-transformer.html
@@ -109,11 +109,7 @@
cb = function(rule) {
rule.selector = self._slottedToContent(rule.selector);
rule.selector = rule.selector.replace(ROOT, ':host > *');
- rule.selector = rule.selector.split(',').map(function(s) {
- s = s.replace(HOST_DIR, HOST_DIR_REPLACE);
- s = s.replace(DIR_PAREN, SHADOW_DIR_REPLACE);
- return s;
- }).join(',');
+ rule.selector = self._dirShadowTransform(rule.selector);
if (callback) {
callback(rule);
}
@@ -320,6 +316,14 @@
return cssText.replace(SLOTTED_PAREN, CONTENT + '> $1');
},
+ _dirShadowTransform: function(selector) {
+ return selector.split(',').map(function(s) {
+ s = s.replace(HOST_DIR, HOST_DIR_REPLACE);
+ s = s.replace(DIR_PAREN, SHADOW_DIR_REPLACE);
+ return s;
+ }).join(',');
+ },
+
SCOPE_NAME: 'style-scope'
};
diff --git a/test/runner.html b/test/runner.html
index a5a6803e73..d18d6ba6ca 100644
--- a/test/runner.html
+++ b/test/runner.html
@@ -105,7 +105,7 @@
'unit/custom-style-transformed.html?lazyRegister=true&useNativeCSSProperties=true&dom=shadow'
];
- if (window.customElements || document.registerElement) {
+ if ('import' in document.createElement('link') && (window.customElements || document.registerElement)) {
suites.push('unit/attach-detach-timing.html');
}
if (/edge/i.test(navigator.userAgent)) {