- From: Adam Argyle via GitHub <sysbot+gh@w3.org>
- Date: Tue, 06 Feb 2024 17:26:56 +0000
- To: public-css-archive@w3.org
What if things are flatter and all worth 1 (except for *)? ```css /* 1 */ ::view-transition-group(foo) /* foo view transition name with any classes */ /* 2 */ ::view-transition-image-pair(*.bar) /* any view transition name with a "bar" class */ /* 3 */ ::view-transition-old(foo.bar) /* foo view transition name with at least class "bar" */ /* 4 */ ::view-transition-new(foo.bar.baz) /* foo view transition name with at least "bar" and "baz" classes */ ``` - 1 has specificity 1 (it's weighted as 1 but known as strong filter since it calls out a single item) - 2 has specificity 1 - 3 has specificity 2 - 4 has specificity 3 - ::view-transition-group(*) remains 0 This would make the author experience less about specificity and more about being specific about the targets. Targeting a pseudo by name already reduces the targets of the selector by a lot, so I don't think it needs higher specificity when it's already so scoped. I see an issue being between #1 and #2 though in that order in the stylesheet would be needed to resolve the final styles. So, i think authors could adjust the selector to be more like 3 or 4, compounding the class with the VT name to "win" and get the end style they want, and thus not needing to worry about rule order. The power is in their hands without needing to learn a new scoring edge case dealing with VT names/IDs. Lean into compound selectors instead of a new specificity system? -- GitHub Notification of comment by argyleink Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9887#issuecomment-1930422641 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 6 February 2024 17:26:59 UTC