diff --git a/src/lib/style-properties.html b/src/lib/style-properties.html
index b485a09829..161b9d1c0b 100644
--- a/src/lib/style-properties.html
+++ b/src/lib/style-properties.html
@@ -285,6 +285,11 @@
return {properties: props, key: o};
},
+ _checkRoot: function(hostScope, selector) {
+ return selector.indexOf(':root') === 0 ||
+ (hostScope === 'html' && selector.indexOf('html') === 0);
+ },
+
whenHostOrRootRule: function(scope, rule, style, callback) {
if (!rule.propertyInfo) {
self.decorateRule(rule);
@@ -292,14 +297,11 @@
if (!rule.propertyInfo.properties) {
return;
}
- var checkRoot = function(hostScope, selector) {
- return selector.indexOf(':root') === 0 || (hostScope === 'html' && selector.indexOf('html') === 0);
- };
var hostScope = scope.is ?
styleTransformer._calcHostScope(scope.is, scope.extends) :
'html';
var parsedSelector = rule.parsedSelector;
- var isRoot = checkRoot(hostScope, parsedSelector);
+ var isRoot = this._checkRoot(hostScope, parsedSelector);
var isHost = parsedSelector.indexOf(':host') === 0;
// build info is either in scope (when scope is an element) or in the style
// when scope is the default scope; note: this allows default scope to have
@@ -312,7 +314,7 @@
isHost = !isRoot && parsedSelector.indexOf(hostScope) === 0;
}
if (cssBuild === 'shadow') {
- isRoot = parsedSelector === ':host > *' || checkRoot(hostScope, parsedSelector);
+ isRoot = parsedSelector === ':host > *' || this._checkRoot(hostScope, parsedSelector);
isHost = isHost && !isRoot;
}
if (!isRoot && !isHost) {