I unpacked 1000 CSS files from EPUB files, ran cssparser on them and it doesn't look bad.
It found quite a few bugs in purchased files, although – luckily – most of it was fine.
I noticed that cssparser ignores the missing last brace:
Code:
.kevin {
color: blue;
This is a bug for me,
http://csslint.net/ shows it nicely.
Spoiler:
For the curious:
There were only 6 files with errors, but as many as 526 there were warnings.
No files had the "Information" status.
The error in the files was always the same: duplicate opening brace.
The warnings (over 5,000 in total) concerned, among others:
- common typing errors (aling, pdding, rightt …)
- non-existent attributes (border-size, cellspacing …)
- attributes related to specific browsers or applications (-webkit…, -o…, -moz…, -ms…, -adobe…)
- attributes with prefix -epub… (-epub-hyphenate, -epub-hyphens, -epub-line-break, -epub-ruby-position, -epub-text-align-last, -epub-text-combine, -epub -text-emphasis-style, -epub-writing-mode)
- font-related attributes, e.g. OpenType features (font-feature-settings, font-kerning, font-variant-numeric …)