Re: [csswg-drafts] [css-scoping-1] Specificity of :host, ::slotted, and :host-context doesn't seem to be defined?

The Working Group just discussed `Specificity of :host, ::slotted, and :host-context doesn't seem to be defined?`, and agreed to the following resolutions:

* `RESOLVED: Account for the specificity of the selector item and change the spec to say pseudo elements have same specificity of pseudo classes.`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: Specificity of :host, ::slotted, and :host-context doesn't seem to be defined?<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/1915<br>
&lt;dael> emilio: Also if we want to keep it. Per spec this has spec of normal pseudo class, but there's a request to effect specificity of selector. I Impl the spec, but blink and webkit don't touch slotted....whatever we decide I'm fine.<br>
&lt;dael> TabAtkins: Should be consistent.<br>
&lt;dael> Rossen: Anyone have a preference?<br>
&lt;dael> rune_: I can't see why we would do it differently<br>
&lt;dael> dbaron: pseudo class vs pseudo element?<br>
&lt;dael> TabAtkins: No, a selector with a pseudo eleemnt add specififity.<br>
&lt;dael> dbaron: Match different things.<br>
&lt;dael> emilio: slotted does that.<br>
&lt;dael> dbaron: Add pseudo elements to specificity<br>
&lt;dael> TabAtkins: Like pseudo class when you can opt in to specila specificity<br>
&lt;dael> TabAtkins: Should change selectors to ask spec of pseudo element defaulting to none at all.<br>
&lt;dael> TabAtkins: Servo asked for it explicity with a similar example.<br>
&lt;TabAtkins> https://github.com/w3c/csswg-drafts/issues/2271<br>
&lt;dael> TabAtkins: I'm okay resolving that we make all these psuedo classes have the specificity of their elements and clarify pseudo elements can have the specificity.<br>
&lt;dael> dbaron: The reason pseudo elements don't have specificity if you have a :before nothing before cna matc so there's no point in changing specificity when you have exactly one. You can change pseudo elements to have a class level specificity.<br>
&lt;dael> TabAtkins: Seems fine.<br>
&lt;dael> Rossen: Prop:<br>
&lt;dael> emilio: Accounting for the specificty of the selector item and change the spec to say pseudo elements have same specificy of pseudo classes.<br>
&lt;dael> emilio: If you have slotted div the spec would be the class?<br>
&lt;dbaron> Interesting, CSS1 said pseudo-elements count as *elements*: https://www.w3.org/TR/CSS1/#cascading-order<br>
&lt;dael> TabAtkins: It would be the same.<br>
&lt;dael> emilio: Override it.<br>
&lt;dael> Rossen: Objections?<br>
&lt;dael> RESOLVED: Account for the specificity of the selector item and change the spec to say pseudo elements have same specificity of pseudo classes.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1915#issuecomment-380364228 using your GitHub account

Received on Wednesday, 11 April 2018 08:03:53 UTC