Re: [csswg-drafts] [css-view-transitions-2] :active-view-transition() specificity (#9546)

The CSS Working Group just discussed `[css-view-transitions-2] :active-view-transition() specificity`, and agreed to the following:

* `RESOLVED: :a-v-t(*) has specificity of 1 class, :a-v-t(list) has specificity of 2 classes`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> vmpstr: With v-t types we have a way to specify a type in startViewTransition()<br>
&lt;TabAtkins> vmpstr: It enables :active-vie-wtransition() on the root<br>
&lt;TabAtkins> vmpstr: Either takes an * or a list of comma-separated types<br>
&lt;TabAtkins> vmpstr: * matches any type, including none, if there's a VT running<br>
&lt;TabAtkins> vmpstr: list of names uses OR semantics<br>
&lt;TabAtkins> vmpstr: So, specificity of pseudoclass<br>
&lt;Rossen_> q?<br>
&lt;TabAtkins> vmpstr: Suggest we have (*) be 1 class specificifity, (list) be 2 class<br>
&lt;khush> +1<br>
&lt;TabAtkins> Doesn't seem unreasonable since the list is class-like, and it's valuable to have *some* specificity from the * one<br>
&lt;YehonatanDaniv> q+<br>
&lt;TabAtkins> miriam: I find it somewhat confusing but I think it works<br>
&lt;Rossen_> ack YehonatanDaniv<br>
&lt;TabAtkins> YehonatanDaniv: I was wondering why not use the same as :is()?<br>
&lt;TabAtkins> YehonatanDaniv: Same as its contents, so * would function as 0<br>
&lt;TabAtkins> vmpstr: The :a-v-t(*) is still more specific than not specifying anything at all, since it only matches when a VT is active<br>
&lt;TabAtkins> vmpstr: So that's why I'm propossing 1 and 2, rather than 0 and 1<br>
&lt;TabAtkins> (Agreed.)<br>
&lt;TabAtkins> fantasai: I think this makes sense. If we end up with more complex logical within :a-v-t() we probably want to expand the rule<br>
&lt;miriam> q+<br>
&lt;Rossen_> ack fantasai<br>
&lt;TabAtkins> fantasai: Like if you later can say "a view-transition with both foo and bar" it shoudl have 3 class specificity<br>
&lt;TabAtkins> vmpstr: agreed<br>
&lt;Rossen_> ack miriam<br>
&lt;bramus> q+<br>
&lt;TabAtkins> miriam: I wonder if a general way of stating that rule is that it's "is-like" + the pseudoclass<br>
&lt;emilio> q+<br>
&lt;TabAtkins> TabAtkins: It's not really a selector - the class names aren't class selectors, so you'd have to map it anyway. Same complexity as just saying it.<br>
&lt;TabAtkins> fantasai: Probably nto quite true, but as simple as it is now it's fine to be manual<br>
&lt;Rossen_> ack *<br>
&lt;Rossen_> ack bramus<br>
&lt;TabAtkins> bramus: Right now authors could write :avt(foo):avt(bar) to amtch both with a higher specificity<br>
&lt;Rossen_> ack emilio<br>
&lt;TabAtkins> emilio: Isn't this an or rather than an and?<br>
&lt;TabAtkins> TabAtkins: Yes, the discussion was about possible future syntax. Today's syntax is just a flat 1-class specificity<br>
&lt;TabAtkins> emilio: Can we just sort out that future stuff when we add it in the future then?<br>
&lt;TabAtkins> TabAtkins: yes<br>
&lt;TabAtkins> vmpstr: So proposal: :a-v-t() specifity is 1 class if it takes a *, 2 classes if it takes a list.<br>
&lt;TabAtkins> fantasai: CAn it be empty?<br>
&lt;TabAtkins> vmpstr: Not valid syntax<br>
&lt;TabAtkins> fantasai: Should it be valid?<br>
&lt;TabAtkins> vmpstr: That's basically what * does, unsure what benefit it woudl bring<br>
&lt;TabAtkins> fantasai: Just in general if there's a reasonable default behavior we allow omitting.<br>
&lt;TabAtkins> vmpstr: I think that might be a separate issue<br>
&lt;TabAtkins> fantasai: yeah<br>
&lt;TabAtkins> RESOLVED: :a-v-t(*) has specificity of 1 class, :a-v-t(list) has specificity of 2 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/9546#issuecomment-1823205562 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 22 November 2023 17:35:29 UTC