diff --git a/src/lib/style-properties.html b/src/lib/style-properties.html index 83619fb120..54a6b317f9 100644 --- a/src/lib/style-properties.html +++ b/src/lib/style-properties.html @@ -426,6 +426,10 @@ rule.keyframesName, rule.transformedKeyframesName); }, + _hasDirOrHostContext: function(parsedSelector) { + return /:host-context|:dir/.test(parsedSelector); + }, + // Strategy: x scope shim a selector e.g. to scope `.x-foo-42` (via classes): // non-host selector: .a.x-foo -> .x-foo-42 .a.x-foo // host selector: x-foo.wide -> .x-foo-42.wide @@ -437,14 +441,22 @@ _scopeSelector: function(rule, hostRx, hostSelector, viaAttr, scopeId) { rule.transformedSelector = rule.transformedSelector || rule.selector; var selector = rule.transformedSelector; - var scope = viaAttr ? '[' + styleTransformer.SCOPE_NAME + '~=' + - scopeId + ']' : - '.' + scopeId; + var scope = styleTransformer._calcElementScope(scopeId, viaAttr); var parts = selector.split(','); for (var i=0, l=parts.length, p; (i + + + + + + + + +