- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Fri, 14 May 2021 15:10:28 +0000
- To: public-houdini-archive@w3.org
> How would the implementation "collect" all the classes defined to inherit from CSSColorValue? Wouldn't you need some sort of registry? I'm not sure what you're referring to - could you elaborate? As I described it, the impl wouldn't need to know anything - it would just check if the value has a `.toTypedOM()` method, and if it does, call it to get a "real" Typed OM value. > Also note that you would need a from method as well, not just a to to be able to support the color space, and these need to produce/accept the same type. A "from" makes it bi-directional, which would mean the impl *would* need to know about the full set, and would involve a registry, yeah. It's possible that doing this with more specialized registries is the way to go, rather than trying to make it generic; that might allow the values to *persist* as the custom class rather than being eagerly converted, too. This requires more thought, clearly. ^_^ -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1038#issuecomment-841304128 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 14 May 2021 15:10:30 UTC