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 22461 - [Shadow]: Change custom pseudo elements to match via ::part(<part name>)
Summary: [Shadow]: Change custom pseudo elements to match via ::part(<part name>)
Status: RESOLVED FIXED
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:
: 20304 (view as bug list)
Depends on:
Blocks: 22715
  Show dependency treegraph
 
Reported: 2013-06-25 17:47 UTC by Steve Orvell
Modified: 2013-08-19 07:54 UTC (History)
5 users (show)

See Also:


Attachments

Description Steve Orvell 2013-06-25 17:47:13 UTC
At a recent WebApps Web Components f2f meeting, it was resolved to change custom pseudo elements to match via ::part(<part name>).

The "pseudo" attribute should also change to "part."

  <div id="host">
  SR
    <header part="header"></header>

is matchable via a selector like:

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

See the meeting notes here: http://www.w3.org/2013/06/21-webapps-minutes.html
Comment 1 Takashi Sakamoto 2013-06-27 06:07:31 UTC
I would like to confirm nested shadow roots case.

Suppose that we have the following:

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

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


So the selector div::part(header) should match all the above <header>s?

Or the selector should match only the first <header>?
Comment 2 Dimitri Glazkov 2013-06-27 15:26:19 UTC
Intuitively, I would think that part only applies in host's shadow tree, but then I have no idea how to reach the part in the nested tree.
Comment 3 Steve Orvell 2013-06-27 17:52:07 UTC
> Intuitively, I would think that part only applies in host's shadow tree

I agree. My understanding is that the left side of the ::part selector must be matchable. Therefore, in the example, it's only the outer header that matches since the div in shadowRoot not matchable.

> I have no idea how to reach the part in the nested tree.

This is why I proposed: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22462
Comment 4 Dimitri Glazkov 2013-07-17 20:07:04 UTC
*** Bug 19891 has been marked as a duplicate of this bug. ***
Comment 5 Dimitri Glazkov 2013-07-17 20:20:52 UTC
*** Bug 20304 has been marked as a duplicate of this bug. ***
Comment 6 Hayato Ito 2013-08-19 07:54:36 UTC
Spec has been updated.
https://dvcs.w3.org/hg/webcomponents/rev/b5c338ac0790