Add support for <meta media> (for <meta name=theme-color>)
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: eoconnor, Assigned: emilio)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.2 Safari/605.1.15
Steps to reproduce:
- HTML PR: https://github.com/whatwg/html/pull/6569
- HTML Issue: https://github.com/whatwg/html/issues/6495
- Mozilla standards-positions issue: https://github.com/mozilla/standards-positions/issues/514
- WebKit bug: https://webkit.org/b/224389
Reporter | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
Hmm, we don't seem to do anything (anymore?) with this metatag. What does WebKit do with it?
Reporter | ||
Comment 3•2 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)
What does WebKit do with it?
WebKit embedders can use WebKit API to determine the current page's theme color, and then what any particular WebKit embedder does with that information (if anything) is up to them.
Updated•2 years ago
|
Comment 4•9 months ago
|
||
We just received a webcompat.com report which reveals that a Blazor app, collanon.app, us struggling to implement proper theming without this, as the libraries they use re-create the meta elements as the page loads and lose media
attributes in the process (due to assuming media
property is implemented, and not thinking to fall back on getAttribute). I've filed a bug with that library, but it would be good to implement this in case other sites are relying on the property likewise.
Assignee | ||
Comment 5•9 months ago
|
||
I mean, implementing media as a reflected attribute is trivial. Comment 0 was more about the theme-color stuff but I guess since we don't do anything with it morphing this to the dom API seems fine.
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Comment 6•9 months ago
|
||
We don't use it because we don't use theme-color, but some sites are
starting to rely on it (comment 4) and it is trivial to support.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ba320f40c889 Add HTMLMetaElement.media. r=smaug
Updated•9 months ago
|
Comment 8•9 months ago
|
||
Backed out for causing wpt failures on reflection-metadata.html . CLOSED TREE
Backout link
Push with failures
Link to failure log
Failure line : TEST-UNEXPECTED-PASS | /html/dom/reflection-metadata.html | meta.media: typeof IDL attribute - expected FAIL
Assignee | ||
Updated•9 months ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6ff9ab044d13 Add HTMLMetaElement.media. r=smaug
Comment 10•9 months ago
|
||
bugherder |
Comment 11•8 months ago
|
||
Hi Emilio, do you consider this is noticeable enough to be in the release note? If so, would be great to have your relnote-firefox ? nomination. :)
Assignee | ||
Comment 12•8 months ago
|
||
Probably not, this is a very simple API / attribute reflection.
Comment 13•8 months ago
|
||
Hi all, I'm having a look through because dev-doc-needed
has been added. It looks like this is not usable from a webdev perspective, is that correct?
My understanding that adding browser compatibility to show Fx support in 106 here would be misleading. Can you confirm that?
If that's the case, is there anything else outstanding for documentation that I can provide? Thanks.
Assignee | ||
Comment 14•8 months ago
|
||
HTMLMetaElement.media
is usable, and is what should get documented.
Assignee | ||
Comment 15•8 months ago
|
||
(Which is missing here afaict)
Comment 16•8 months ago
|
||
Thanks, Emilio. Tracking the related documentation tasks for this here: https://github.com/mdn/content/issues/20928
Updated•7 months ago
|
Description
•