- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Tue, 16 Jan 2024 20:55:47 +0000
- To: public-css-archive@w3.org
tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts: == `:nth-child(n of A)` should ignore default namespaces for A, same as `:is()` == The `:is()`, `:not()`, and `:where()` pseudos all have text that states that if the final compound selector in their arguments doesn't have a type selector, we ignore the general rule that requires them to match the default namespace (when one exists). (That is, given `@namespace "http://example.com";`, a selector like `.foo` is implicitly only selecting elements from that default namespace; you have to explicitly write `*|*.foo` to get back to the normal behavior of allowing any namespace to match. This doesn't apply to `:is()`/etc arguments.) This special behavior exists to ensure that the combo pseudoclasses intuitively work correctly when used as syntax sugar; that is, given any selector `AB`, replacing it with `A:is(B, C)` is guaranteed to match all the same elements, and possibly more. See #5684 for more details. This same argument should apply to the `n of A` arguments to `:nth-child()`/etc: going from `AB` to `A:nth-child(n of B)` should match the exact same elements. Currently (lacking the special rule that `:is()`/etc have), this isn't necessarily true; changing `svg|a.foo` to `svg.a:nth-child(n of .foo)` makes it stop matching anything at all, if the default namespace is not SVG. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9804 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 16 January 2024 20:55:50 UTC