View Single Post
Old 12-31-2020, 09:47 PM   #17
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,858
Karma: 6120478
Join Date: Nov 2009
Device: many
Okay, it seems the the CSSInfo parser of Sigil does not handle combinators at all nor pseudo classes nor @media rules.

To properly test a css selector that uses adjacent, child, or descendent combinators means some use of a css selector based query or xpath like interface for Sigil's html5 repair parser gumbo. And as far as I know, these simply do not exist in C++ or C. I will continue to search for one. The closest I can find is a jQuery like interface for gumbo here:

https://github.com/lazytiger/gumbo-query

but it appears to be 5 years old with no real updates.


If I can not find anything useful, we must then turn to python and its css-parser and cssselect and lxml to do this properly. But that means we would just be pretty much duplicating wrCisco's plugin but internal to Sigil using pyqt5 in place of tk.

That seems to be wasteful duplication. Perhaps we should delete the unused class removal feature from Sigil and instead point people to wrCisco's plugin for that functionality completely.

Ideas? Thoughts?
KevinH is offline   Reply With Quote