Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Contest_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ Properties for file reference objects:
| mime | string | Mime type of resource.
| width | integer ? | Width of the image. Required for files with mime type image/\*.
| height | integer ? | Height of the image. Required for files with mime type image/\*.
| variant | array of string | Intended usage hints (e.g. `light`, `dark` for images).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm the only one, but I don't think variant is a good name here as to me it suggests that the options are mutually exclusive. Also, given that this is a list of options, I'd go for a plural terms, so for lack of better, I'd say tags.


The `href` property may be an [absolute or relative
URL](https://datatracker.ietf.org/doc/html/rfc3986); relative URLs must be
Expand All @@ -292,6 +293,13 @@ the values of `width` and `height` should be the viewport width and height in pi
when possible, but otherwise the actual values don't matter as long as they
are positive and represent the correct aspect ratio.

Known values of variant include:

- `light`: an image intended for use on white or light backgrounds.
- `dark`: an image intended for use on black or dark backgrounds.

An image may list both values if it is suitable for multiple contexts.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 'multiple contexts' -> 'both backgrounds' simpler?


If implementing support for uploading files pointed to by resource
links, substitute the href property with a data property with a base64
encoded string of the associated file contents as the value.
Expand Down