- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 01 Mar 2023 17:24:48 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-cascade-6] Scoped selectors shouldn't match the scope root unless explicitly requested with :scope?`, and agreed to the following: * `RESOLVED: clarifications for scoping selectors proposed by miriam` <details><summary>The full IRC log of that discussion</summary> <fremy> miriam: the scope roots elements are currently part of the scope, with no implied relationship<br> <fremy> miriam: so, if you use the same selector for both ends, the end matches the root<br> <fremy> miriam: bramus and others found that confusing<br> <fremy> miriam: so the proposal would be to imply that nesting scope selectors include :scope<br> <fremy> miriam: except if they explicitly refererence :scope or use ampersand<br> <fremy> miriam: there are a couple of differences between :scope and ampersand<br> <TabAtkins> & references all the elements matched by the scope-start selector (as normal for Nesting), :scope matches the specific element that is functioning as the scope in a given element's context.<br> <fantasai> +1 to the proposal<br> <fremy> miriam: mainly you can use & multiple times<br> <TabAtkins> +1 to the proposal<br> <fremy> miriam: so the proposal clarifies the difference<br> <astearns> ack fantasai<br> <fremy> fantasai: what is the specificity of :scope and ampersand?<br> <fremy> miriam: there is another issue on that<br> <fremy> miriam: but my guess is that ampersand should work just as in nesting<br> <fremy> miriam: (wrapping the starting scope selector in :is)<br> <bramus> q+<br> <fremy> TabAtkins: (missed short comment)<br> <fremy> astearns: does that work for you fantasai ?<br> <astearns> ack bramus<br> <fremy> fantasai: yes<br> <TabAtkins> TabAtkins: That's also my preference<br> <fremy> bramus: should we also introduce :end for the end boundary?<br> <fremy> bramus: for sibling scopes, that might be useful<br> <fantasai> proposal was to have & use the specificity of the selector it's referencing, and for :scope to have its normal specificity (1 pseudo-class)<br> <fremy> miriam: this sounds like a separate resolution<br> <fremy> miriam: could you provide some clear use cases for that?<br> <TabAtkins> have we discussed the meaning of relative selectors like `> .foo`? Do those get captured by Nesting, implying an &, or do they imply a :scope? I think the latter should be the case.<br> <fremy> astearns: the proposed resolution is in the last comment of the thread<br> <fremy> astearns: looking at tab's question on irc<br> <fremy> astearns: tab, do you want to voice the question?<br> <fremy> miriam: I think I agree with TabAtkins suggestion<br> <fremy> miriam: relative selectors (...missed)<br> <fremy> miriam: question was what happens if the selector starts with a descendant combinator<br> <fremy> miriam: so just adding a descendant combinator should be the same as the default<br> <astearns> ack fantasai<br> <fremy> fantasai: I think that it implies that every selector inside a scope that doesn't start with an ampersand has an additional pseudo-class specificity<br> <fremy> TabAtkins: no, no difference<br> <fremy> TabAtkins: the implied-ness is just for the meaning, but not the specificity<br> <fremy> TabAtkins: the implied one does not add specificity<br> <fremy> fantasai: p and :scope p are the same, but with different specificities<br> <fremy> TabAtkins: yes<br> <fremy> fantasai: and if I add (...) I could match more<br> <fremy> TabAtkins: yes, not in that use case, but in others yes<br> <fremy> fantasai: if you use descendants, you can match much more<br> <fremy> fantasai: and both :scope and & can match the scoping element, but no other selector can<br> <fremy> miriam: no other selector make it remove the nested-within combinator<br> <fremy> TabAtkins: by the magic of relative selectors, it will never happen<br> <fremy> TabAtkins: you have to make it absolute to override<br> <fremy> fantasai: ok, this is probably fine, but the spec should be extra clear about it<br> <fremy> astearns: so, the proposed resolution is to accept miriam's prososal + add new clarifications<br> <fremy> astearns: any comment?<br> <fremy> fantasai: lgtm<br> <fremy> astearns: any objection?<br> <fantasai> s/lgtm/I think this is a good change and I support it/<br> <fremy> RESOLVED: clarifications for scoping selectors proposed by miriam<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8377#issuecomment-1450541396 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 1 March 2023 17:24:50 UTC