-
Notifications
You must be signed in to change notification settings - Fork 73
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
Publish CSS bits as @webref/css #111
Comments
Autogenerating IDL per CSSOM could be a good additional touch. |
Do you think that should go in this package, or in |
Hmm, maybe it should go to the IDL package. |
For linking purpose, autogeneration of IDL per CSSOM is tracked in #51. |
I wonder whether directly synthesizing AST for IDL would make more sense than generating IDL text and then parse it, since in that case I think it fits better in |
The direction we've chosen so far is more to export raw material and provide some parsing guarantees. That's not perfect. We still need to use a JSON structure for CSS extracts because that is the raw-est option, and the guarantees somewhat impose to use a JS runtime, whereas data could be useful in other runtimes. I would still prefer to stick to that for the time being. If I understand CSSOM correctly, each property essentially generates one, two, or three attributes on the
The information in the CSS extracts would tell where specific attributes in the additional IDL file come from. It would also allow one to easily generate the IDL text (and AST) for a given CSS property if needed. How about it? |
Sounds good enough to me 👍
Not in my mind. |
For my purposes, an implementation of https://drafts.csswg.org/cssom/#css-property-to-idl-attribute would suffice. That's what I use in https://github.com/foolip/mdn-bcd-collector/blob/3fe6959d582d7daac229969fd72586352db2ea1f/build.js#L592-L610 and given that it's easy to generate the IDL as text, or just generate tests which is what I do. |
I also don't think having all the generated IDL as a single block would be useful. |
You mean you want multiple blocks? 👀 |
I misread what I responded to. I don't have a need for the IDL-as-text at all, but having it all as a single block seems less useful than having a block per spec. The main reason I don't need the IDL-as-text is that mdn-bcd-collector also adds lots of non-standard CSS properties, and I want to generate the same kinds of tests for those. Thus I need to start with property names and generate IDL or tests from those. |
Sounds reasonable. I'm okay with properties only as I already have machineries to generate IDL. |
FYI, I just published @webref/css v1.0.0. |
Yay!! I'll try using it right away and see how that goes :) |
I had no trouble integrating this into mdn-bcd-collector, success! foolip/mdn-bcd-collector#1047 |
As a follow-up to #63 we should also have a
@webref/css
package.@saschanaz needs it for saschanaz/types-web#66, and I'm also still using webref directly in https://github.com/foolip/mdn-bcd-collector because I get CSS properties from it.
What should be in such a package? Is it simply the JSON files in ed/css/?
The text was updated successfully, but these errors were encountered: