View Single Post
Old 01-11-2021, 01:52 PM   #66
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,841
Karma: 6120478
Join Date: Nov 2009
Device: many
CSSProperties.cpp contains the list of all css3 properties this parser groks.

If there are official properties that are currently valid and commonly used in epubs that should be added to that list, please let me know which ones need to be added and I will add them.

As for the missing final } of a selector, I thought, it provided a warning for that and injected its own. I will look into that.

Thanks for all your testing and feedback!

Quote:
Originally Posted by BeckyEbook View Post
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 …)
KevinH is offline   Reply With Quote