-
Notifications
You must be signed in to change notification settings - Fork 86
Group CSS features #1519
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
Comments
I note the current
The mixed bag of things exists because CSS specs do not really distinguish between other types when they define concepts. There is a notion of CSS specs do use a CSS specs define units as Essentially, the question is: can CSS features be categorized automatically? If not, what amount of manual data would need to be maintained? |
Thanks for the response. A follow-up question: assuming everyone wants |
No reason in theory and, on top of trying to reduce the amount of work needed to maintain Webref, we also restrict the amount of data that needs to be manually injected in Webref to a bare minimum as a way to push fixes and improvements back to the underlying specs. In practice there are ~120 CSS specs at various levels of maturity and activity, with dozens of editors and >3800 open issues. We already maintain a few patches in Webref for things that need fixing in CSS specs to get consistent data (these patches link back to issues raised against the specs). If most CSS specs need to be updated to provide additional semantics, that's likely going to require elbow grease both to convince CSS WG participants that the effort is worth prioritizing and to help with the actual updates. That's also why I'm trying to assess whether missing categories can already be determined automatically from available information. |
Ah gotcha, thanks for explaining. 👍 |
I explored a bit the differences between MDN data and Webref, see underlying code in
As far as I can tell, missing data in Webref is mostly stuff that is non standard or that has been obsoleted, but that is still present in MDN data (and sometimes documented on MDN). I do not know to what extent that data is a must have in Webref. There's more data missing in MDN data, perhaps because the underlying features are more recent and not yet documented. There may be a few cases where data needs to be slightly improved in specs so that it can start appearing in Webref. One example is I still do not understand what syntaxes are meant to encompass. I managed to cover most of them by assembling functions and types, but that also creates hundreds of syntaxes that are not accounted for in MDN data. Are syntaxes used in practice? How? (On top of the features themselves, I note that the grouping information in MDN data does not exist in Webref. That grouping seems more specific to MDN though. Same thing for links to MDN pages). |
Syntaxes are used in CSSTree to enable validation: Basically, the parser creates an AST and the lexer validates the AST against these syntax definitions. |
Thanks @nzakas. I had not realized that entries in the "types" category in MDN data do not have a That initial exploration suggests that the categorization itself can be done automatically, with straightforward reasons that explain why some data is missing in Webref. That's a good first result! I'll now look into actual |
Thanks for the update and all of our work on this. 🙏 |
One of the valuable parts of the
mdn-data
package is how it separates CSS features into different categories:In the current webref package, it's just a collection of objects that we then need to dig into to figure out what types are contained within. It would be helpful if the categories could be exposed at the top level of the package and list every entry for that category regardless of spec.
The text was updated successfully, but these errors were encountered: