diff --git a/src/lib/style-properties.html b/src/lib/style-properties.html index 245ec42cc6..1d9ec99171 100644 --- a/src/lib/style-properties.html +++ b/src/lib/style-properties.html @@ -349,7 +349,12 @@ // 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.x-foo-42.wide + // host selector: x-foo.wide -> .x-foo-42.wide + // note: we use only the scope class (.x-foo-42) and not the hostSelector + // (x-foo) to scope :host rules; this helps make property host rules + // have low specificity. They are overrideable by class selectors but, + // unfortunately, not by type selectors (e.g. overriding via + // `.special` is ok, but not by `x-foo`). _scopeSelector: function(rule, hostRx, hostSelector, viaAttr, scopeId) { rule.transformedSelector = rule.transformedSelector || rule.selector; var selector = rule.transformedSelector; diff --git a/src/standard/x-styling.html b/src/standard/x-styling.html index 196efd256d..deb5438f60 100644 --- a/src/standard/x-styling.html +++ b/src/standard/x-styling.html @@ -18,6 +18,7 @@ var serializeValueToAttribute = Polymer.Base.serializeValueToAttribute; var propertyUtils = Polymer.StyleProperties; + var styleUtil = Polymer.StyleUtil; var styleTransformer = Polymer.StyleTransformer; var styleDefaults = Polymer.StyleDefaults;