- From: Lea Verou via GitHub <noreply@w3.org>
- Date: Wed, 23 Jul 2025 18:09:06 +0000
- To: public-css-archive@w3.org
@tabatkins > Right, we _cannot_ actually infer types in general. There's too much trivial overlap between types (`red` might be an animation name or a color, for example), and there's too much flexibility in grammars to reliably get hints from placement. We can and do infer types **in context**. E.g. `red` in `background-color: red` is a color, not a keyword. As long as the type of `light-dark()` is inferred from the type of its first argument, I'm not sure how it's any different from inferring the type of its argument when used directly. > Anyway, I'm fine either way for the function here. If several people are leaning towards the "single function, takes two colors _or_ two images", great, that's fine. Perfectly unambiguous, just adds a touch of complexity to the impl but nothing serious. And two dimensions! Would that add too much complexity? If so, would restricting to `<number>` make it easier? -- GitHub Notification of comment by LeaVerou Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12513#issuecomment-3109613217 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 23 July 2025 18:09:06 UTC