- From: carlosjeurissen <notifications@github.com>
- Date: Sat, 07 Feb 2026 12:49:20 -0800
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/manifest/issues/975/3865409314@github.com>
carlosjeurissen left a comment (w3c/manifest#975)
Just thinking out loud. Letting the author define the order has other side effects. Authors make mistakes, it is harder to process and communicate for/to authors. we may be able to resolve the approach by allowing developers to specify the "any" value for all the constraints.
With this approach, implementations would follow something similar to the algorithm @dmurph described. With a spec-defined order of precedence. Yet by adding "any" as value for some of the constraints, developers can opt-in to the author-defined order (the current web-extension icon_variants logic). In a way working a bit similar to css selector specificity. ie, using ".class.class" vs ".class". While this sounds like a hack, in this case being very explicit puts the icon groups in the same importance. If all icon groups have the same amount of constraints, (and using the any matches at times), authors can basically opt-in to the author defined order. This replaces duplication with "any" annotations.
In your example.
```json
[{
"512": "fr-512.png",
"192": "fr-192.png",
"32": "fr-32.png",
"lang": ["fr"]
}, {
"512": "dark-512.png",
"192": "dark-192.png",
"32": "dark-32.png",
"color_schemes": ["dark"]
}]
```
With your algorithm, `color_schemes` takes precedence over "lang". Developers could opt-in to author-defined order by changing it to:
```json
[{
"512": "fr-512.png",
"192": "fr-192.png",
"32": "fr-32.png",
"lang": ["fr"],
"color_schemes": ["any"]
}, {
"512": "dark-512.png",
"192": "dark-192.png",
"32": "dark-32.png",
"lang": ["any"],
"color_schemes": ["dark"]
}]
```
This way there is no need for duplication while being more forgiving to inconsiderate / careless authors/developers and generally be more predictable.
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/975#issuecomment-3865409314
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/manifest/issues/975/3865409314@github.com>
Received on Saturday, 7 February 2026 20:49:24 UTC