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

Report invalid CSS Value Definition Syntax #327

Closed
pyoor opened this issue Jun 16, 2020 · 2 comments
Closed

Report invalid CSS Value Definition Syntax #327

pyoor opened this issue Jun 16, 2020 · 2 comments

Comments

@pyoor
Copy link
Contributor

pyoor commented Jun 16, 2020

One of the most common issues I've found in when parsing these specifications is that the CSS value definition is incorrect. Often times this is due to the lack of quotes around CSS properties (as opposed to CSS Types).

An example of this can be seen here:
w3c/csswg-drafts#5222

I believe that reffy could easily be modified to report these errors. After parsing the spec, all definitions could be combined into a single grammar and parsed to determine if any of the rules include an invalid reference.

Is this something you'd consider adding or would be open to?

@tidoust
Copy link
Member

tidoust commented Jun 17, 2020

First, I note that we ran that exercise some time ago and reported potentially problematic specs to the CSS WG (as you did with CSS Speech), see #110. The list most likely needs to be updated (some of these have been fixed since we last looked at it, and there must be new ones to add...)

It would be good to report these errors directly. Our current focus is not really on CSS syntax for the time being. If you are open to contributing, we'd definitely be open to reviewing ;)

The "missing CSS rules" file probably needs to be revisited too:
https://github.com/tidoust/reffy/blob/master/src/specs/missing-css-rules.json

PS: More generally, we're trying to consolidate the code into logical components and would be very interested to learn about existing usage of the code and/or of the reports. If you can share the context that leads you to look into Reffy's reports, either here or privately ([email protected]), that would be great. It is, obviously, totally fine if you cannot or do not want to!

@pyoor
Copy link
Contributor Author

pyoor commented Jun 22, 2020

Unfortunately my project that leverages reffy is not public at this time. However, in it's simplest form, we're using reffy to extract the CSS value definitions from the specs and for use with css-tree.

I think that I could apply the syntax validation code to reffy fairly easily. I'll try and take a look at it in the next week or two and if so, send you a PR. In the meantime, I'll go ahead and close this issue.

Thanks!

@pyoor pyoor closed this as completed Jun 22, 2020
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

No branches or pull requests

2 participants