[Bug 21391] New: [Shadow]: allow @host rules to match nodes in the host scope not just the host node

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21391

            Bug ID: 21391
           Summary: [Shadow]: allow @host rules to match nodes in the host
                    scope not just the host node
    Classification: Unclassified
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
          Assignee: dglazkov@chromium.org
          Reporter: sorvell@chromium.org
        QA Contact: public-webapps-bugzilla@w3.org
            Blocks: 14978

At a recent discussion, it was proposed that the @host rule would be much more
powerful if it could match the host's tree rather than only the host node.

The @host rule would match only the host element or one of its descendants.

The rule would apply in the scope of the host element. This would allow
matching the host element based on some ancestor match. The :scope
pseudo-selector would be used to reference the host element itself. For
example:

@host {
  /* match host elements with an ancestor matching .foo */
  .foo :scope {
    ...
  }
}

Issue: The host itself may be inside a shadowDOM. It would be nice to allow
some way to specify rules that can reach to the global css scope. This would
allow for shadowDOM styling based on some master theme selector, for example.


In addition, the @host rule could function as a short-hand method (in lieu of
::distributed) for targeting any distributed content. For example,

@host {
  /* match any distributed nodes */
  :scope > * {
    ...
  }

  /* match .bar distributed nodes if the host matches .foo */
  .foo:scope > .bar {
    ...
  }

}

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 25 March 2013 19:44:18 UTC