diff --git a/src/lib/style-transformer.html b/src/lib/style-transformer.html
index caf8ddd710..94775b5589 100644
--- a/src/lib/style-transformer.html
+++ b/src/lib/style-transformer.html
@@ -311,9 +311,7 @@
},
_transformDocumentSelector: function(selector) {
- return (selector.match(SCOPE_JUMP) || selector.match(SIMPLE_SELECTOR_SEP) )?
- this._transformComplexSelector(selector, SCOPE_DOC_SELECTOR) :
- this._transformSimpleSelector(selector.trim(), SCOPE_DOC_SELECTOR);
+ return this._transformComplexSelector(selector, SCOPE_DOC_SELECTOR);
},
// For forward compatibility with ShadowDOM v1 and Polymer 2.x,
diff --git a/test/unit/custom-style-transformed.html b/test/unit/custom-style-transformed.html
index 88de82cd79..e0b064c580 100644
--- a/test/unit/custom-style-transformed.html
+++ b/test/unit/custom-style-transformed.html
@@ -21,6 +21,9 @@
color: rgb(123, 123, 123);
border: 10px solid black;
}
+ html, body:not([foo]) * {
+ padding-left: 10px;
+ }