This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22462 - [Shadow]: Consider adding an applyAuthorHostStyles flag
Summary: [Shadow]: Consider adding an applyAuthorHostStyles flag
Status: RESOLVED WONTFIX
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Hayato Ito
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 22715
  Show dependency treegraph
 
Reported: 2013-06-25 18:05 UTC by Steve Orvell
Modified: 2014-01-17 07:59 UTC (History)
2 users (show)

See Also:


Attachments

Description Steve Orvell 2013-06-25 18:05:01 UTC
The ::part() api allows a convenient way to target parts of a shadowRoot from a scope in which the host element is targetable. However, the host is only targetable in the styling scope in which it exists. An author may want to make its parts style-able from any scope. e.g.

  #host::part(header) { ... }

The applyAuthorStyles flag exists for a similar use case: to allow styling shadowRoot contents from any enclosing scope. However, it is undesirable in the case that an author wants only to expose specifically defined parts to the enclosing scopes.

For this case, we should introduce a new flag: applyAuthorHostStyles. This would make the shadowRoot host element and any ::part targetable from any enclosing scope. Selectors that can match the host element when applyAuthorHostStyles is used would be required to match entirely within the scope of the host element.
Comment 1 Bronislav Klučka 2013-06-27 19:56:35 UTC
(In reply to comment #0)

do I understand it correctly that there's gonna be a shitch to make



<style>
div::part(internal) { ... }
</style>

<div>
SR
    <header></header>
    <div>
    SR
        <section part="internal"></header>


work?

BK
Comment 2 Hayato Ito 2014-01-17 07:59:03 UTC
I think this is obsolete.

'^' and '^^' can resolve this use case, can't they?

Please feel free to reopen this if you have any concerns.