[webkit-dev] Request for position: Honor media HTML attribute for link icon

François Beaufort ���� fbeaufort at google.com
Wed Mar 3 05:31:47 PST 2021


Hi webkit-dev,

This is a request for WebKit's position on honoring the media HTML
attribute for link[rel="icon"] as specified by the HTML spec.

Spec:

https://html.spec.whatwg.org/multipage/semantics.html#processing-the-media-attribute

Discussion:
  https://github.com/whatwg/html/issues/6408

Existing WebKit bug:
   https://bugs.webkit.org/show_bug.cgi?id=68861

Summary:

The link element’s “media” attribute will be honored for link[rel="icon"]
so that web developers can define multiple equally appropriate icons based
on a media query (dark and light modes for instance). The last one that
matches will be picked.

Note that browsers don’t currently honor the media attribute for
link[rel="icon"] even though the HTML specification says they should:
"Icons could be auditory icons, visual icons, or other kinds of icons. If
multiple icons are provided, the user agent must select the most
appropriate icon according to the type, media, and sizes attributes."


Best.
François
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20210303/bfb23917/attachment.htm>


More information about the webkit-dev mailing list