Skip to content

Link relation for dark color scheme in alternate links #78

@mickael-menu

Description

@mickael-menu

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"
            }
        ]
    },
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions