_transformRule(rule, transformer, scope, hostScope) {
    // NOTE: save transformedSelector for subsequent matching of elements
    // against selectors (e.g. when calculating style properties)
    rule['selector'] = rule.transformedSelector =
      this._transformRuleCss(rule, transformer, scope, hostScope);
  }
transforms a css rule to a scoped rule.

@param {StyleNode} rule
@param {Function} transformer
@param {string=} scope
@param {string=} hostScope