This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
According to CSS cascading order, any style in a shadow tree wins comparing with ::part declared in document. (just talking about scope, specificity and order of appearance). However, it would be better to apply ::part in document if the rule has higher specificity than all styles in a shadow tree. For example, <style> #host::x-part { color: orange; } </style> <div id="host"> #shadow-root <style> div { color: blue; } </style> <div pseudo="x-part">style me</div> </div> If we cannot override, "style me"'s color is blue. We cannot change. So this makes it much more difficult to create <style> in a shadow tree when we want to use "::part". c.f. http://crbug.com/273138
I need to say about "the same specificity" case. In the case, document's style wins. For example, <style> #host::part(x-part) { color: orange; } </style> <div id="host"> #shadow-root <style> #target.targetClass { color: blue; } </style> <div id="target" clas="targetClass" part="x-part">style me</div> </div> #host::part(x-part)'s specificity is id + pseudo element(=class). #target.targetClass's specificity is id + class. So the rules have the same specificity. In the case, "style me"'s color is orange.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=23467 is a replacement for ::part.
Closing this bug because '::part' was dead.