- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Fri, 17 Sep 2021 16:16:23 +0000
- To: public-css-archive@w3.org
Yeah, there's several possible methods to address this, and we've used all of them, as I outlined last month in [a similar @scroll-timeline issue](https://github.com/w3c/csswg-drafts/pull/6472#issuecomment-902831765): 1. Use dashed-ident for author-defined names, so they're guaranteed safe and separated from CSS-defined ones. (Example: `color()` keywords.) 2. Let the namespaces mingle, but author-defined wins over CSS-defined. (Example: `@counter-style` names) 3. Let the namespaces mingle, but CSS-defined wins over author-defined. (Example: `@font-face` names) (3) is fine if we expect to expand the set rarely or never, and/or expect that the names we'd add are unlikely to be used by authors. It's better than 2 if there are security or perf reasons to want the predefined names to be well-known and immediately resolveable. (2) is fine if we don't have the above expectation, but are okay with the possibility that an author naively uses a predefined name but accidentally gets something custom (not realizing that the name has been overridden somewhere else in the page's styles). In the case of @counter-style, we also didn't want to make a big deal of which languages we happened to predefine vs ones we forced authors to implement, for sensitivity reasons. (1) is always safe and easy, it just clearly separates out author-defined from CSS-defined. For this, I don't see a particular reason not to go with (1); it seems like the easiest route. > Making the @font-palette-values rule win actually might be a feature in its own right - it lets an author intentionally redefine what the "light" palette is for a particular font, rather than just using the first palette with the USABLE_WITH_LIGHT_BACKGROUND bit set. This is legitimate, tho we can mix it up with dashed-ident if we'd like, defining light/dark to be specifically overrideable while the other keywords aren't. Or we could make them all overrideable; I don't have a strong opinion. CSS doesn't have a precedent. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6633#issuecomment-921919734 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 17 September 2021 16:16:24 UTC