-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing media attribute for the meta tag #31
Comments
Luckily it is possible after all with |
That's what I've done as well for similar issues. I think the attributes are generated automatically from a list (here), but I'm not sure how @robb compiled that list or how we can add stuff. In my code base, I used |
To add properties, you would have to add them to the static let meta = Tag(
name: "Meta",
description: "Text metadata.",
- attributes: .charset, .content, .httpEquiv, .name5
+ attributes: .charset, .content, .httpEquiv, .name5, .media
properties: .emptyElement
) (If you do, please keep everything alphabetized) I took the list from the WHATWG, don't remember exactly which version but something like this: https://html.spec.whatwg.org/review-drafts/2020-01/#elements-3 Not super happy with the current state of things, maybe this could be ported to a couple of XML or JSON files to generate the attributes from? Part of the complexity lies in different semantics for attributes with the same name on different tags (e.g. Ideally, we would also be able to automatically perform safe conversions, e.g. from |
Yup, I think having an escape hatch is always important for this kind of API design. |
The "media" attribute is not available for meta tags, so something like this is currently impossible:
Would you want me to create a PR?
The text was updated successfully, but these errors were encountered: