Skip to content
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

Find CSS properties that aren't in the tables #419

Merged
merged 4 commits into from
Oct 31, 2020

Conversation

gsnedders
Copy link
Contributor

I'm not really sure if this is a good idea (versus just having people look through dfns to get the complete list of all properties), but I wrote this so it exists now 🤷🏻 Opinions welcome, etc.

@tidoust
Copy link
Member

tidoust commented Oct 10, 2020

The CSS extracts should contain all CSS properties and, ideally, there should be no diff between the list of CSS properties in the CSS extract and the list of CSS properties in the dfn extract. In other words, this pull request is needed :)

This code would add the following properties:

  1. stop-color and stop-opacity in SVG. It would actually be good to add custom extraction code for these definitions. That can be done separately though.
  2. All -webkit-* property aliases in Compat.
  3. Legacy Gap Properties in CSS Box Alignment.
  4. The legacy -webkit-user-select and -webkit-appearance properties in CSS Basic User Interface.
  5. The legacy -webkit-line-clamp property in CSS Overflow.

That all looks good.

One problem is that this would also add the property-name example in CSS 2, and the --* family of properties in CSS Variables. These properties don't really exist, so it does not make sense to include them in the CSS extracts. They are hardcoded in the CSS extraction code. They probably have to be hardcoded here as well. Could you update the pull request accordingly? (The specs themselves should perhaps be updated since the definitions should actually not really be flagged as "property" dfns).

Out of curiosity, I also checked whether all CSS properties in the CSS extracts have corresponding entries in the dfns extract. That seems to be the case!

@gsnedders
Copy link
Contributor Author

stop-color and stop-opacity in SVG. It would actually be good to add custom extraction code for these definitions. That can be done separately though.

Or someone should update the spec! 🙃

(The specs themselves should perhaps be updated since the definitions should actually not really be flagged as "property" dfns).

Alas, given they're generated the same way as the other propdef my brief look at avoiding this in Bikeshed was… difficult. But probably worth filing an issue.

The logic used to be in extract-cssdfn.js, but since these "properties" also
appear in the dfns extract, this update moves the logic to the end of the CSS
extract preparation.
@tidoust
Copy link
Member

tidoust commented Oct 31, 2020

One problem is that this would also add the property-name example in CSS 2, and the --* family of properties in CSS Variables. These properties don't really exist, so it does not make sense to include them in the CSS extracts. They are hardcoded in the CSS extraction code. They probably have to be hardcoded here as well. Could you update the pull request accordingly?

I updated the pull request to exclude property-name and --* from the CSS extracts.

@tidoust tidoust merged commit 29fc903 into w3c:master Oct 31, 2020
@gsnedders gsnedders deleted the extra-props branch November 1, 2020 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants