From 788aad5f6f3a5697fcd4e60269b588b569a48c6f Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Wed, 8 Nov 2017 09:45:50 -0800 Subject: [PATCH] Fix :dir() bare selector in native shadowdom More correct fix for :dir() with CSS Custom Property Shim enabled --- src/lib/style-properties.html | 16 +++++----------- src/lib/style-transformer.html | 8 +++++++- test/unit/dir.html | 17 ++++++++++++++--- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/src/lib/style-properties.html b/src/lib/style-properties.html index 54a6b317f9..fab1cb8153 100644 --- a/src/lib/style-properties.html +++ b/src/lib/style-properties.html @@ -442,21 +442,15 @@ rule.transformedSelector = rule.transformedSelector || rule.selector; var selector = rule.transformedSelector; var scope = styleTransformer._calcElementScope(scopeId, viaAttr); + var hostScope = styleTransformer._calcElementScope(hostSelector, viaAttr); var parts = selector.split(','); + var isDirOrHostContextSelector = this._hasDirOrHostContext(rule.parsedSelector); for (var i=0, l=parts.length, p; (i +