webpub-manifest icon indicating copy to clipboard operation
webpub-manifest copied to clipboard

Link relation for dark color scheme in alternate links

Open mickael-menu opened this issue 4 years ago • 0 comments

In some cases, it could be useful to declare a "dark mode" variant of an alternate Link object. For example with the logo image in the OPDS Authentication Document.

For the sake of standardization, I suggest using the color-scheme-dark / color-scheme-light link relations. Inspired by the prefers-color-scheme media query.

"links": [
    {
        "href": "http://example.com/logo.jpg",
        "rel": "logo",
        "type": "image/jpeg",
        "alternate": [
            {
                "href": "http://example.com/logo-dark.jpg",
                "rel": "color-scheme-dark",
                "type": "image/jpeg"
            }
        ]
    },
]

mickael-menu avatar Feb 22 '21 11:02 mickael-menu