-
Notifications
You must be signed in to change notification settings - Fork 408
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
CSS properties can be misspelled. #935
Comments
I don't think it's a syntax error, as it conforms to the rules of CSS Syntax. Browsers will ignore such a rule, so it's rather harmless. I believe doing more than syntactic validation is out of scope for EPUBCheck, at least beyond the EPUB-specific requirements (see w3c/publ-cg#69). I'll close this as |
Hm, @rdeltour, I guess this can be debated… 🤔 According to the Mozilla docs there are about 300 CSS properties defined which I would consider syntactical keywords in a CSS file. If a keyword is misspelled then that would constitute a syntax error. The documentation also says that,
but I think that is to cater to the early days of HTML soup and lazy programming, where a browser had to tolerate invalid HTML & CSS and still render something. However, with epubcheck being a validation tool, it would make much sense to point out invalid syntax in a CSS file because the programmer should fix that—whether the e-reader would render the property or not. If you run the above example through W3C’s CSS validator, you get this: |
The declaration itself conform to the CSS Syntax Module (currently at Level 3), so by CSS terminology it's syntactically correct (the same way the sentence "This CSS file is perfectly cromulent." is syntactically correct, even if the word "cromulent" doesn't exist 🙂). That said, it's absolutely right that the property doesn't exist and that could be reported as an error by a validator (as it is by the W3C validation service). I'm just thinking that doing it is probably a bit out of scope for EPUBCheck, as there are other better CSS validation services out there 😊. |
I noticed that there are several closely related CSS issues that are currently filed here:
I’d argue that these are all token and syntax errors, and I would like to add yet another one that I noticed today:
The
margin-bottm
is misspelled which technically is a syntax error (invalid token). I would vote that this should be reported as an error by epubcheck.The text was updated successfully, but these errors were encountered: