-
Notifications
You must be signed in to change notification settings - Fork 77
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
Switch to use webRef as input #76
Comments
As discussed offline, I agree that webref is a really great package for this project to start relying on. The MDN website itself now also uses webref instead of the mdn/data repo for things like CSS syntax. As for descriptions, I tend to think that MDN's descriptions might be better suited for this project. MDN is written for end users, while webref comes from w3c specs which are mostly for browser makers. Now, I do realize that MDN's descriptions are not readily available as a package. But I think extracting it in an automated way shouldn't be too hard either. I started playing with this idea recently here: https://github.com/captainbrosset/mdn-web-data/ (this is just an exploration, not ready for use). Maybe @dontcallmedom can chime in on the usefulness of the webref descriptions vs. what's on MDN right now (Dom: for context, the present repo is used to provide intellisense in VS Code for CSS/HTML code when you hover over attributes, properties, values. It's also used by Chrome DevTools to provide tooltips on hover of CSS properties). |
+1 that MDN would be a more developer-friendly source of prose than webref; beyond that, if there is any change needed in webref to make it easier to integrate in VS code, @tidoust and I will be more than happy to look into accommodating them. |
For info, things are moving in the right direction on this topic. The OWD collective is working right now on making MDN data more easily embeddable by others. You can find more information on their project issue here: openwebdocs/project#174. In particular:
The work has started, and there's already a few bits and pieces that seem promising:
I've played a bit with these packages in this experimental repo: https://github.com/captainbrosset/webdocs. |
@wbamberg is the one working on the above (at the moment), and can provide more information and offer corrections to on top of my previous message. Also, Will, feel free to take a look at the contents of the |
One thing I'd say about this is that while mdn-flavored-markdown is pretty generic, mdn-kumascript is very "opinionated", meaning the macro processing it does is really targeted at extraction of specific parts of MDN pages, and doesn't give you a like-for-like rendering of MDN pages as a complete blob of HTML. It's really supposed to be used by the web-docs-data package, which builds this JSON extract of bits of MDN, webref, and BCD. The data currently included in web-docs-data is described in https://www.npmjs.com/package/web-docs-data (currently it is only CSS properties, but we will add other parts of CSS and also HTML elements and attributes), but I can quote it here for convenience: Currently it contains only CSS properties, accessible under the "properties" key of the "css" object: {
"css": {
"properties": {
...
"margin": {}
...
}
}
} Each property object may contain:
All these properties should be treated as optional. (though it would be nice to make better guarantees than this). Also note that at the moment we're not updating the package on any regular schedule, it is experimental right now. |
Webref contains machine readable contents extracted from web browser specifications, including descriptions
https://github.com/w3c/webref
https://www.npmjs.com/package/@webref/css
The text was updated successfully, but these errors were encountered: