-
Notifications
You must be signed in to change notification settings - Fork 69
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
Generate partial IDL fragments for CSS properties for WPT? #51
Comments
I've previously experimented in that direction in foolip/wpt@e2c50fb and you have filed web-platform-tests/wpt#9113 where there's some discussion. I did write code at one point to generate the Web IDL, which I can't find, but it's easy to do. However, since there's more that can be checked in JS for each property than these attributes, like |
I think we want both? |
Yes, and because we want both having the generated IDL isn't going to be all that useful, we can check the small number of things they would check together with the other tests, so that shallow tests for a property are in one place, with one naming convention. I think that'll be nicer to deal with when adding support and updating test expectations, at least. |
Summary of the discussion in #111 on this topic: generating the IDL is not that useful but having the IDL attribute names that each property generates is. Goal is thus to add a {
"properties": {
"align-content": {
"styleDeclaration": ["align-content", "alignContent"]
}
}
} |
See related discussion in: w3c/webref#51 This update adds a `styleDeclaration` property to CSS property definitions in CSS extracts. The property contains the list of IDL attribute names that the CSS property generates per the CSSOM spec on the `CSSStyleDeclaration` interface: https://drafts.csswg.org/cssom/#ref-for-css-property-to-idl-attribute The implementation of the CSS property to IDL attribute algorithm was copied over from: https://github.com/foolip/mdn-bcd-collector/blob/c2126e8f367f08333a0f7b0604e42c8fdc11d182/build.js#L569
See related discussion in: w3c/webref#51 This update adds a `styleDeclaration` property to CSS property definitions in CSS extracts. The property contains the list of IDL attribute names that the CSS property generates per the CSSOM spec on the `CSSStyleDeclaration` interface: https://drafts.csswg.org/cssom/#ref-for-css-property-to-idl-attribute The implementation of the CSS property to IDL attribute algorithm was copied over, with @foolip approval as author [1], from: https://github.com/foolip/mdn-bcd-collector/blob/c2126e8f367f08333a0f7b0604e42c8fdc11d182/build.js#L569 [1] #611 (review)
This adjusts workflows to also handle and release a `@webref/elements` package, as discussed in #51. Tests guarantee that interfaces that appear in the package also exist in the `@webref/idl`. Ideally, the IDL package should be added as peer dependency to the elements package but that creates a chicken-and-egg situation as we will likely often release packages together. Patches are an overkill for now but could prove useful in the long run. The update also splits CSS, elements, and IDL tests. That is a first step towards addressing #237. It does not fully solve it though, as IDL patches are still applied when the CSS package is released.
This adjusts workflows to also handle and release a `@webref/elements` package, as discussed in #51. Tests guarantee that interfaces that appear in the package also exist in the `@webref/idl`. Ideally, the IDL package should be added as peer dependency to the elements package but that creates a chicken-and-egg situation as we will likely often release packages together. Patches are an overkill for now but could prove useful in the long run. The update also splits CSS, elements, and IDL tests. That is a first step towards addressing #237. It does not fully solve it though, as IDL patches are still applied when the CSS package is released.
All CSS properties descriptions now contain a |
CSSOM defines up to three partial interfaces that are created for each supported property:
It would be nice to have these tested in WPT, whether Reffy itself generates these or whether they're generated merely for the WPT export.
See also speced/bikeshed#549 for a Bikeshed feature request to add generation of these to Bikeshed, and w3c/csswg-drafts#5412 for potential pitfalls here (though as far as I'm aware no such property is currently defined)
The text was updated successfully, but these errors were encountered: